From: Jonas Bernoulli <jonas@bernoul.li>
To: 48592@debbugs.gnu.org
Subject: bug#48592: [PATCH 1/2] Support plural forms of Author and Maintainer library headers
Date: Sat, 22 May 2021 22:32:49 +0200 [thread overview]
Message-ID: <20210522203250.2216-1-jonas@bernoul.li> (raw)
In-Reply-To: <20210522202519.32549-1-jonas@bernoul.li>
* doc/lispref/tips.texi (Library Headers): Mention that in addition to
the "Author" and "Maintainer" headers, their plural forms are also
supported.
* lisp/emacs-lisp/lisp-mnt.el (lm-authors): Consider "Authors" header
in addition to "Author".
(lm-maintainers): New function.
(lm-maintainer): Make obsolete in favor of lm-maintainer.
(lm-verify): Use lm-maintainers. Mention plural headers also.
(lm-report-bug): Use lm-maintainers.
---
doc/lispref/tips.texi | 24 +++++++++++++-----------
lisp/emacs-lisp/lisp-mnt.el | 28 ++++++++++++++++++----------
2 files changed, 31 insertions(+), 21 deletions(-)
diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi
index 36c68ee5ce..25d43dfcfe 100644
--- a/doc/lispref/tips.texi
+++ b/doc/lispref/tips.texi
@@ -1034,7 +1034,8 @@ Library Headers
@table @samp
@item Author
-This line states the name and email address of at least the principal
+@itemx Authors
+This header states the name and email address of at least the principal
author of the library. If there are multiple authors, list them on
continuation lines led by @code{;;} and a tab or at least two spaces.
We recommend including a contact email address, of the form
@@ -1042,22 +1043,23 @@ Library Headers
@smallexample
@group
-;; Author: Your Name <yourname@@example.com>
+;; Authors: Your Name <yourname@@example.com>
;; Someone Else <someone@@example.com>
;; Another Person <another@@example.com>
@end group
@end smallexample
@item Maintainer
-This header has the same format as the Author header. It lists the
-person(s) who currently maintain(s) the file (respond to bug reports,
-etc.).
-
-If there is no maintainer line, the person(s) in the Author field
-is/are presumed to be the maintainers. Some files in Emacs use
-@samp{emacs-devel@@gnu.org} for the maintainer, which means the author is
-no longer responsible for the file, and that it is maintained as part
-of Emacs.
+@itemx Maintainers
+This header has the same format as the Author(s) header. It lists the
+person(s) who currently maintain(s) the file (respond(s) to bug
+reports, etc.).
+
+If there is no Maintainer(s) header, the person(s) in the Author(s)
+header is/are presumed to be the maintainer(s). Some files in Emacs
+use @samp{emacs-devel@@gnu.org} for the maintainer, which means the
+author is no longer responsible for the file, and that it is
+maintained as part of Emacs.
@item Created
This optional line gives the original creation date of the file, and
diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el
index 73a33a553f..25b5e8c5bd 100644
--- a/lisp/emacs-lisp/lisp-mnt.el
+++ b/lisp/emacs-lisp/lisp-mnt.el
@@ -375,17 +375,25 @@ lm-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
- (let ((authorlist (lm-header-multiline "author")))
+ (let ((authorlist (lm-header-multiline "authors?")))
(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 "maintainers?")
+ (lm-header-multiline "authors?")))))
+
(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."
@@ -544,9 +552,9 @@ lm-verify
((null name)
"Can't find package name")
((not (lm-authors))
- "`Author:' tag missing")
- ((not (lm-maintainer))
- "`Maintainer:' tag missing")
+ "`Author:' or `Authors:' tag missing")
+ ((not (lm-maintainers))
+ "`Maintainer:' or `Maintainers:' tag missing")
((not (lm-summary))
"Can't find the one-line summary description")
((not (lm-keywords))
@@ -613,7 +621,7 @@ lm-report-bug
(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) ">")
--
2.30.1
next prev parent reply other threads:[~2021-05-22 20:32 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-22 20:25 bug#48592: [PATCH 0/2] Support plural forms of Author and Maintainer library headers Jonas Bernoulli
2021-05-22 20:32 ` Jonas Bernoulli [this message]
2021-05-22 20:32 ` bug#48592: [PATCH 2/2] * lisp/emacs-lisp/lisp-mnt.el (lm-crack-address): Right-trim name Jonas Bernoulli
2021-05-23 6:46 ` bug#48592: [PATCH 0/2] Support plural forms of Author and Maintainer library headers Eli Zaretskii
2021-05-23 8:43 ` Jonas Bernoulli
2021-05-23 9:31 ` Eli Zaretskii
2021-05-23 9:52 ` Colin Baxter
2021-05-23 11:08 ` Lars Ingebrigtsen
2021-05-23 11:48 ` Michael Albinus
2021-05-23 18:21 ` Jonas Bernoulli
2021-05-23 18:45 ` Michael Albinus
2021-05-23 21:14 ` Jonas Bernoulli
2021-05-24 7:04 ` Michael Albinus
2021-05-24 7:28 ` Eli Zaretskii
2021-05-24 8:58 ` Jonas Bernoulli
2021-05-24 9:22 ` Christopher Dimech
2021-05-24 12:16 ` Michael Albinus
2021-05-24 9:44 ` Eli Zaretskii
2021-05-24 12:10 ` Michael Albinus
2021-05-24 13:51 ` Lars Ingebrigtsen
2021-06-30 17:59 ` Jonas Bernoulli
2021-06-30 19:24 ` Michael Albinus
2021-06-30 19:41 ` Jonas Bernoulli
2021-07-01 11:40 ` Lars Ingebrigtsen
2024-02-14 1:43 ` J.P.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210522203250.2216-1-jonas@bernoul.li \
--to=jonas@bernoul.li \
--cc=48592@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).