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.
This commit is contained in:
Alex Kost 2016-04-09 13:26:33 +03:00
parent 57748c2756
commit 557361e79f
1 changed files with 7 additions and 0 deletions

View File

@ -116,6 +116,7 @@ SEARCH-TYPE may be one of the following symbols: `all', `id', `name'."
:sort-key '(name)) :sort-key '(name))
(let ((map guix-license-list-mode-map)) (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)) (define-key map (kbd "RET") 'guix-license-list-show-packages))
(defun guix-license-list-describe (ids) (defun guix-license-list-describe (ids)
@ -129,6 +130,12 @@ SEARCH-TYPE may be one of the following symbols: `all', `id', `name'."
(interactive) (interactive)
(guix-packages-by-license (guix-list-current-id))) (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 ;;; Interactive commands