From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Philip Kaludercic <philipk@posteo.net>
Cc: Jonas Bernoulli <jonas@bernoul.li>, emacs-devel@gnu.org
Subject: Re: Request to add Package to GNU ELPA
Date: Thu, 06 Apr 2023 17:36:22 -0400 [thread overview]
Message-ID: <jwvv8i8g0ph.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87pm8hf1z0.fsf@posteo.net> (Philip Kaludercic's message of "Thu, 06 Apr 2023 15:46:11 +0000")
> +;; Package-Requires: ((emacs "26.1") (compat "29.1.0.0"))
[ I'm curious which definitions of `compat` this uses. ]
> @@ -1208,10 +1214,13 @@ package-buffer-info
> :kind 'single
> :url website
> :keywords keywords
> - :maintainer
> + :maintainer (lm-maintainer)
> ;; For backward compatibility, use a single string if there's only
> ;; one maintainer (the most common case).
> - (let ((maints (lm-maintainers))) (if (cdr maints) maints (car maints)))
> + (if (fboundp 'lm-maintainers)
> + (let ((maints (lm-maintainers)))
> + (if (cdr maints) maints (car maints)))
> + (lm-maintainer))
> :authors (lm-authors)))))
Hmm... isn't the `(lm-maintainer)` right after `:maintainer` erroneous?
[ BTW, I think Jonas has another change pending for this code. ]
> (when news
> - (insert "\n" (make-separator-line) "\n"
> - (propertize "* News" 'face 'package-help-section-name)
> + (newline)
> + (when (fboundp 'make-separator-line)
> + (insert (make-separator-line))
> + (newline))
> + (insert (propertize "* News" 'face 'package-help-section-name)
> "\n\n")
> (insert-file-contents news))
Why not just replace (make-separator-line) with
(if (fboundp 'make-separator-line) (make-separator-line) "")?
`newline` is a command and I think it's preferable not to use it
from ELisp.
> @@ -4571,8 +4581,11 @@ package-report-bug
> (dolist (ent (get (cdr group) 'custom-group))
> (when (and (custom-variable-p (car ent))
> (boundp (car ent))
> - (not (eq (custom--standard-value (car ent))
> - (default-toplevel-value (car ent))))
> + (not (eq
> + ;; We are not using `custom--standard-value'
> + ;; to retain compatibility for Emacs 27.
> + (eval (car (get (car ent) 'standard-value)) t)
> + (default-toplevel-value (car ent))))
I'd use
(if (fboundp 'custom--standard-value) ;; Emacs≥27
(custom--standard-value (car ent))
(eval (car (get (car ent) 'standard-value)) t))
so the code "speaks for itself".
Stefan
next prev parent reply other threads:[~2023-04-06 21:36 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-30 13:42 Request to add Package to GNU ELPA Jonas Bernoulli
2023-03-30 16:40 ` Felician Nemeth
2023-03-30 17:37 ` Philip Kaludercic
2023-03-30 17:32 ` Philip Kaludercic
2023-03-31 17:15 ` Jonas Bernoulli
2023-04-05 8:59 ` Philip Kaludercic
2023-04-05 14:13 ` Jonas Bernoulli
2023-04-05 18:07 ` Philip Kaludercic
2023-04-05 18:26 ` Philip Kaludercic
2023-04-05 21:08 ` Philip Kaludercic
2023-04-06 15:46 ` Philip Kaludercic
2023-04-06 21:36 ` Stefan Monnier [this message]
2023-04-07 7:23 ` Philip Kaludercic
2023-04-07 15:39 ` Stefan Monnier
2023-04-08 8:24 ` Philip Kaludercic
2023-04-09 15:29 ` Stefan Monnier
2023-04-09 17:27 ` Philip Kaludercic
2023-04-07 10:07 ` Philip Kaludercic
2023-04-06 11:41 ` Jonas Bernoulli
2023-04-17 16:24 ` Adding package-vc to ELPA Philip Kaludercic
2023-09-16 17:20 ` Stefan Kangas
2023-09-17 8:02 ` Philip Kaludercic
2023-03-30 19:10 ` Request to add Package to GNU ELPA chad
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=jwvv8i8g0ph.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=jonas@bernoul.li \
--cc=philipk@posteo.net \
/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).