From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: [PATCH 3/3] emacs: Add "edit" command to a list of licenses. Date: Mon, 18 Apr 2016 11:17:55 +0300 Message-ID: <1460967475-3771-4-git-send-email-alezost@gmail.com> References: <1460967475-3771-1-git-send-email-alezost@gmail.com> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48483) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1as4Np-0004gI-ID for guix-devel@gnu.org; Mon, 18 Apr 2016 04:18:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1as4Nn-0003SW-QH for guix-devel@gnu.org; Mon, 18 Apr 2016 04:18:13 -0400 Received: from mail-lf0-x244.google.com ([2a00:1450:4010:c07::244]:32841) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1as4Nn-0003QD-Ie for guix-devel@gnu.org; Mon, 18 Apr 2016 04:18:11 -0400 Received: by mail-lf0-x244.google.com with SMTP id p64so25170699lfg.0 for ; Mon, 18 Apr 2016 01:18:11 -0700 (PDT) Received: from localhost.localdomain ([217.107.192.146]) by smtp.gmail.com with ESMTPSA id ku5sm2865250lbc.11.2016.04.18.01.18.10 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Apr 2016 01:18:10 -0700 (PDT) In-Reply-To: <1460967475-3771-1-git-send-email-alezost@gmail.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * emacs/guix-ui-license.el (guix-license-list-edit): New command. (guix-license-list-mode-map): Bind it to "e" key. --- emacs/guix-ui-license.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/emacs/guix-ui-license.el b/emacs/guix-ui-license.el index 772a168..cf1b5cd 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 -- 2.7.3