unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: Adam Porter <adam@alphapapa.net>
Cc: emacs-devel@gnu.org
Subject: Re: Supporting newer Emacs features in older Emacs versions without warnings?
Date: Thu, 23 Sep 2021 09:58:57 +0100	[thread overview]
Message-ID: <87zgs3hdm6.fsf@tcd.ie> (raw)
In-Reply-To: <87ee9gjc4p.fsf@alphapapa.net> (Adam Porter's message of "Wed, 22 Sep 2021 20:48:06 -0500")

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	other threads:[~2021-09-23  8:58 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 [this message]
2021-09-24  6:08   ` Adam Porter
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=87zgs3hdm6.fsf@tcd.ie \
    --to=contovob@tcd.ie \
    --cc=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).