summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2019-08-14 16:35:16 -0700
committerLars Ingebrigtsen <larsi@gnus.org>2019-08-14 16:35:16 -0700
commit1a2055310055dffc664ab9d1095b38bc7afd3581 (patch)
treed01047c811adb6ee15aecd1892897dab06b91c53 /lisp
parentcad5418f18b496b0ec8f280201fb32cb39eefdfe (diff)
downloademacs-1a2055310055dffc664ab9d1095b38bc7afd3581.tar.gz
emacs-1a2055310055dffc664ab9d1095b38bc7afd3581.tar.bz2
emacs-1a2055310055dffc664ab9d1095b38bc7afd3581.zip
Output the maintainer and author(s) in the package description buffer
* lisp/emacs-lisp/package.el (describe-package-1): Output maintainer and author(s) (bug#17573). (package--print-email-button): New function.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emacs-lisp/package.el32
1 files changed, 31 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index e7e0bd11247..a72522ad8f8 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -2356,7 +2356,9 @@ The description is read from the installed package files."
(installable (and archive (not built-in)))
(status (if desc (package-desc-status desc) "orphan"))
(incompatible-reason (package--incompatible-p desc))
- (signed (if desc (package-desc-signed desc))))
+ (signed (if desc (package-desc-signed desc)))
+ (maintainer (cdr (assoc :maintainer extras)))
+ (authors (cdr (assoc :authors extras))))
(when (string= status "avail-obso")
(setq status "available obsolete"))
(when incompatible-reason
@@ -2479,6 +2481,19 @@ The description is read from the installed package files."
'action 'package-keyword-button-action)
(insert " "))
(insert "\n"))
+ (when maintainer
+ (package--print-help-section "Maintainer")
+ (package--print-email-button maintainer))
+ (when authors
+ (package--print-help-section
+ (if (= (length authors) 1)
+ "Author"
+ "Authors"))
+ (package--print-email-button (pop authors))
+ ;; If there's more than one author, indent the rest correctly.
+ (dolist (name authors)
+ (insert (make-string 13 ?\s))
+ (package--print-email-button name)))
(let* ((all-pkgs (append (cdr (assq name package-alist))
(cdr (assq name package-archive-contents))
(let ((bi (assq name package--builtins)))
@@ -2577,6 +2592,21 @@ The description is read from the installed package files."
(apply #'insert-text-button button-text 'face button-face 'follow-link t
props)))
+(defun package--print-email-button (name)
+ (when (car name)
+ (insert (car name)))
+ (when (and (car name) (cdr name))
+ (insert " "))
+ (when (cdr name)
+ (insert "<")
+ (insert-text-button (cdr name)
+ 'follow-link t
+ 'action (lambda (_)
+ (compose-mail
+ (format "%s <%s>" (car name) (cdr name)))))
+ (insert ">"))
+ (insert "\n"))
+
;;;; Package menu mode.