From: Adam Porter <adam@alphapapa.net>
To: emacs-devel@gnu.org
Subject: Re: Supporting newer Emacs features in older Emacs versions without warnings?
Date: Fri, 24 Sep 2021 01:08:49 -0500 [thread overview]
Message-ID: <8735pucxou.fsf@alphapapa.net> (raw)
In-Reply-To: 87zgs3hdm6.fsf@tcd.ie
"Basil L. Contovounesios" <contovob@tcd.ie> writes:
> Adam Porter [2021-09-22 20:48 -0500] wrote:
>
>> Is there a cleaner way to do this?
>
> Here's what I do, FWIW:
>
> (with-eval-after-load 'shortdoc
> (declare-function shortdoc-add-function "shortdoc" (group section elem))
> (mapc
> (pcase-lambda (`(,section . ,elems))
> (dolist (elem elems)
> (setq elem `(,(car elem) :no-manual t ,@(cdr elem)))
> (shortdoc-add-function 'foo section elem)))
> '(("Frobnicating"
> (foo-frobnicate
> :no-eval (foo-frobnicate)
> :eg-result-string "...")
> ...)
> ("Bifurcating"
> (foo-bifurcate
> :no-eval (foo-bifurcate)
> :eg-result "...")
> ...)
> ...)))
Hi Basil,
Thanks, that does seem to produce fewer warnings in older Emacs
versions. (Of course, package-lint complains about using
with-eval-after-load outside of user configuration, but that's not
Emacs's fault.)
next prev parent reply other threads:[~2021-09-24 6:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-23 1:48 Supporting newer Emacs features in older Emacs versions without warnings? Adam Porter
2021-09-23 8:58 ` Basil L. Contovounesios
2021-09-24 6:08 ` Adam Porter [this message]
2021-09-24 13:14 ` Stefan Monnier
2021-09-24 22:22 ` Adam Porter
2021-09-26 16:49 ` Basil L. Contovounesios
2021-09-27 18:38 ` Stefan Monnier
2021-09-28 10:26 ` Basil L. Contovounesios
2021-09-28 12:51 ` Stefan Monnier
2021-09-28 17:07 ` Basil L. Contovounesios
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=8735pucxou.fsf@alphapapa.net \
--to=adam@alphapapa.net \
--cc=emacs-devel@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).