aboutsummaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2016-04-09 13:26:33 +0300
committerAlex Kost <alezost@gmail.com>2016-04-26 12:32:56 +0300
commit557361e79f9c78798084a1c3ceb177d18c65f6fc (patch)
tree390b07c232d6e1195a59ef975c1e8da6f8fa827f /emacs
parent57748c27565117b3ad10c7fce67c36ecf5e5d5c7 (diff)
downloadpatches-557361e79f9c78798084a1c3ceb177d18c65f6fc.tar
patches-557361e79f9c78798084a1c3ceb177d18c65f6fc.tar.gz
emacs: Add "edit" command to a list of licenses.
* emacs/guix-ui-license.el (guix-license-list-edit): New command. (guix-license-list-mode-map): Bind it to "e" key.
Diffstat (limited to 'emacs')
-rw-r--r--emacs/guix-ui-license.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/emacs/guix-ui-license.el b/emacs/guix-ui-license.el
index 772a16801f..cf1b5cd357 100644
--- a/emacs/guix-ui-license.el
+++ b/emacs/guix-ui-license.el
@@ -116,6 +116,7 @@ SEARCH-TYPE may be one of the following symbols: `all', `id', `name'."
:sort-key '(name))
(let ((map guix-license-list-mode-map))
+ (define-key map (kbd "e") 'guix-license-list-edit)
(define-key map (kbd "RET") 'guix-license-list-show-packages))
(defun guix-license-list-describe (ids)
@@ -129,6 +130,12 @@ SEARCH-TYPE may be one of the following symbols: `all', `id', `name'."
(interactive)
(guix-packages-by-license (guix-list-current-id)))
+(defun guix-license-list-edit (&optional directory)
+ "Go to the location of the current license definition.
+See `guix-license-file' for the meaning of DIRECTORY."
+ (interactive (list (guix-read-directory)))
+ (guix-find-license-definition (guix-list-current-id) directory))
+
;;; Interactive commands