emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Supporting newer Emacs features in older Emacs versions without warn


From: Basil L. Contovounesios
Subject: Re: Supporting newer Emacs features in older Emacs versions without warnings?
Date: Thu, 23 Sep 2021 09:58:57 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

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 "...")
      ...)
     ...)))

-- 
Basil



reply via email to

[Prev in Thread] Current Thread [Next in Thread]