diff options
author | Jonas Bernoulli <jonas@bernoul.li> | 2021-05-03 23:22:47 +0200 |
---|---|---|
committer | Jonas Bernoulli <jonas@bernoul.li> | 2021-06-30 19:53:48 +0200 |
commit | 3cfc5532021357ef2e1284323e6936fafce484e5 (patch) | |
tree | 153abc5992dfeebc5dad2ae159f5b2136c26fe9a /lisp/emacs-lisp | |
parent | 0e3668b23323de130d6d8cda70c4669a4b7aa2f3 (diff) | |
download | emacs-3cfc5532021357ef2e1284323e6936fafce484e5.tar.gz emacs-3cfc5532021357ef2e1284323e6936fafce484e5.tar.bz2 emacs-3cfc5532021357ef2e1284323e6936fafce484e5.zip |
Add new function lm-maintainers (bug#48592)
* doc/lispref/tips.texi (Library Headers): Improve wording.
* lisp/emacs-lisp/lisp-mnt.el (lm-maintainers): New function.
(lm-maintainer): Make obsolete in favor of lm-maintainer.
(lm-verify): Use lm-maintainers.
(lm-report-bug): Use lm-maintainers.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/lisp-mnt.el | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el index 11a04400877..83da495edf0 100644 --- a/lisp/emacs-lisp/lisp-mnt.el +++ b/lisp/emacs-lisp/lisp-mnt.el @@ -378,14 +378,22 @@ the cdr is an email address." (let ((authorlist (lm-header-multiline "author"))) (mapcar #'lm-crack-address authorlist)))) +(defun lm-maintainers (&optional file) + "Return the maintainer list of file FILE, or current buffer if FILE is nil. +If the maintainers are unspecified, then return the authors. +Each element of the list is a cons; the car is the full name, +the cdr is an email address." + (lm-with-file file + (mapcar #'lm-crack-address + (or (lm-header-multiline "maintainer") + (lm-header-multiline "author"))))) + (defun lm-maintainer (&optional file) "Return the maintainer of file FILE, or current buffer if FILE is nil. +If the maintainer is unspecified, then return the author. The return value has the form (NAME . ADDRESS)." - (lm-with-file file - (let ((maint (lm-header "maintainer"))) - (if maint - (lm-crack-address maint) - (car (lm-authors)))))) + (declare (obsolete lm-maintainers "28.1")) + (car (lm-maintainers file))) (defun lm-creation-date (&optional file) "Return the created date given in file FILE, or current buffer if FILE is nil." @@ -545,7 +553,7 @@ copyright notice is allowed." "Can't find package name") ((not (lm-authors)) "`Author:' tag missing") - ((not (lm-maintainer)) + ((not (lm-maintainers)) "`Maintainer:' tag missing") ((not (lm-summary)) "Can't find the one-line summary description") @@ -613,7 +621,7 @@ Prompts for bug subject TOPIC. Leaves you in a mail buffer." (interactive "sBug Subject: ") (require 'emacsbug) (let ((package (lm-get-package-name)) - (addr (lm-maintainer)) + (addr (car (lm-maintainers))) (version (lm-version))) (compose-mail (if addr (concat (car addr) " <" (cdr addr) ">") |