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:
parent
57748c2756
commit
557361e79f
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue