[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Supporting newer Emacs features in older Emacs versions without warn
From: |
Adam Porter |
Subject: |
Re: Supporting newer Emacs features in older Emacs versions without warnings? |
Date: |
Fri, 24 Sep 2021 01:08:49 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
"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.)
- Supporting newer Emacs features in older Emacs versions without warnings?, Adam Porter, 2021/09/22
- Re: Supporting newer Emacs features in older Emacs versions without warnings?, Basil L. Contovounesios, 2021/09/23
- Re: Supporting newer Emacs features in older Emacs versions without warnings?,
Adam Porter <=
- Re: Supporting newer Emacs features in older Emacs versions without warnings?, Stefan Monnier, 2021/09/24
- Re: Supporting newer Emacs features in older Emacs versions without warnings?, Adam Porter, 2021/09/24
- Re: Supporting newer Emacs features in older Emacs versions without warnings?, Basil L. Contovounesios, 2021/09/26
- Re: Supporting newer Emacs features in older Emacs versions without warnings?, Stefan Monnier, 2021/09/27
- Re: Supporting newer Emacs features in older Emacs versions without warnings?, Basil L. Contovounesios, 2021/09/28
- Re: Supporting newer Emacs features in older Emacs versions without warnings?, Stefan Monnier, 2021/09/28
- Re: Supporting newer Emacs features in older Emacs versions without warnings?, Basil L. Contovounesios, 2021/09/28