aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/emacs-lisp/package.el17
1 files changed, 13 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 2f19573e3cd..c1545a28701 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -4532,19 +4532,28 @@ DESC must be a `package-desc' object."
4532 (funcall browse-url-secondary-browser-function url) 4532 (funcall browse-url-secondary-browser-function url)
4533 (browse-url url)))) 4533 (browse-url url))))
4534 4534
4535(declare-function ietf-drums-parse-address "ietf-drums"
4536 (string &optional decode))
4537
4535(defun package-maintainers (pkg-desc &optional no-error) 4538(defun package-maintainers (pkg-desc &optional no-error)
4536 "Return an email address for the maintainers of PKG-DESC. 4539 "Return an email address for the maintainers of PKG-DESC.
4537The email address may contain commas, if there are multiple 4540The email address may contain commas, if there are multiple
4538maintainers. If no maintainers are found, an error will be 4541maintainers. If no maintainers are found, an error will be
4539signaled. If the optional argument NO-ERROR is non-nil no error 4542signaled. If the optional argument NO-ERROR is non-nil no error
4540will be signaled in that case." 4543will be signaled in that case."
4541 (unless pkg-desc 4544 (unless (package-desc-p pkg-desc)
4542 (error "Invalid package description")) 4545 (error "Invalid package description: %S" pkg-desc))
4543 (let* ((extras (package-desc-extras pkg-desc)) 4546 (let* ((name (package-desc-name pkg-desc))
4547 (extras (package-desc-extras pkg-desc))
4544 (maint (alist-get :maintainer extras))) 4548 (maint (alist-get :maintainer extras)))
4545 (cond 4549 (cond
4546 ((and (null maint) (null no-error)) 4550 ((and (null maint) (null no-error))
4547 (user-error "Package has no explicit maintainer")) 4551 (user-error "Package `%s' has no explicit maintainer" name))
4552 ((and (not (progn
4553 (require 'ietf-drums)
4554 (ietf-drums-parse-address maint)))
4555 (null no-error))
4556 (user-error "Package `%s' has no maintainer address" name))
4548 ((not (null maint)) 4557 ((not (null maint))
4549 (with-temp-buffer 4558 (with-temp-buffer
4550 (package--print-email-button maint) 4559 (package--print-email-button maint)