From: Lars Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: Macro expansion containing ‘interactive’
Date: Thu, 19 Aug 2021 15:37:24 +0200 [thread overview]
Message-ID: <87k0kh7dyj.fsf@gnus.org> (raw)
In-Reply-To: <jwvpmu9po1g.fsf-monnier+emacs@gnu.org> (Stefan Monnier via Users list for the's message of "Thu, 19 Aug 2021 09:24:23 -0400")
Stefan Monnier via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:
>> In an attempt to create a compatibility wrapper for the new optional mode
>> list parameter of ‘interactive’ I am facing difficulties. The definition
>> looks like this:
>
> `interactive` is not a special form. Just like docstrings, it's a part
> of the syntax of `lambda`, so you need to define a `foo-lambda` if you
> want it to work reliably.
Yup. When doing code that needs to be backwards-compatible here, it's
better to use a declare form instead:
(defun foo ()
(declare (modes dired-mode))
(interactive)
...)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2021-08-19 13:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-19 10:30 Macro expansion containing ‘interactive’ Marcus Harnisch
2021-08-19 13:24 ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-08-19 13:37 ` Lars Ingebrigtsen [this message]
2021-08-19 15:42 ` [External] : " Drew Adams
2021-08-20 21:51 ` Stefan Monnier
2021-08-24 8:52 ` Marcus Harnisch
2021-08-25 11:06 ` Lars Ingebrigtsen
2021-08-25 12:53 ` Marcus Harnisch
2021-08-19 14:51 ` Michael Heerdegen
2021-08-19 15:14 ` Stefan Monnier via Users list for the GNU Emacs text editor
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=87k0kh7dyj.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=help-gnu-emacs@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.
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).