summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2016-04-07 21:36:32 +0300
committerAlex Kost <alezost@gmail.com>2016-04-18 10:09:02 +0300
commita7c61781df789183665dc7570e088ec11678a7db (patch)
tree5ebec801c416a8a3f8e320f407d6f6c3cc4b3e24
parent690c055b0816608e4bf740d4e931f3810e6ed120 (diff)
downloadgnu-guix-a7c61781df789183665dc7570e088ec11678a7db.tar
gnu-guix-a7c61781df789183665dc7570e088ec11678a7db.tar.gz
emacs: Display license info on button press in Package Info buffer.
* emacs/guix-ui-package.el (guix-package-license): Adjust button action to display license info instead of browsing license URL.
-rw-r--r--emacs/guix-ui-package.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/emacs/guix-ui-package.el b/emacs/guix-ui-package.el
index 7e20b32a06..38f0c08fc7 100644
--- a/emacs/guix-ui-package.el
+++ b/emacs/guix-ui-package.el
@@ -346,9 +346,13 @@ formatted with this string, an action button is inserted.")
(define-button-type 'guix-package-license
:supertype 'guix
'face 'guix-package-info-license
- 'help-echo "Browse license URL"
+ 'help-echo "Display license info"
'action (lambda (btn)
- (guix-browse-license-url (button-label btn))))
+ (require 'guix-ui-license)
+ (guix-buffer-get-display-entries
+ 'info 'license
+ (list 'name (button-label btn))
+ 'add)))
(define-button-type 'guix-package-name
:supertype 'guix