emacs-devel
[Top][All Lists]
Advanced

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

Re: scratch/command 064f146 1/2: Change command to interactive ... modes


From: Lars Ingebrigtsen
Subject: Re: scratch/command 064f146 1/2: Change command to interactive ... modes
Date: Thu, 18 Feb 2021 11:33:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Stefan Kangas <stefankangas@gmail.com> writes:

> It is working for me in Emacs 27, and it was working for me at the time
> when I wrote it (both byte-compiled and interpreted).

You're absolutely right -- I wonder what's going on in my Emacs here.
Here's my test case:

(defun foo-command1 ()
  (future-interactive nil emacs-lisp-mode)
  (+ 1 2))

If I `C-M-x' (`eval-defun') on that in this Emacs, then:

(symbol-function 'foo-command1)
=> (lambda nil (future-interactive nil emacs-lisp-mode) (+ 1 2))

But if I start a fresh Emacs, then:

(symbol-function 'foo-command1)
=> (lambda nil (interactive nil emacs-lisp-mode) (+ 1 2))

which is what you're also seeing.

Stefan M says that macroexpansion happens differently with different
commands, which makes sense, but...  er...  what is making `eval-defun'
in this particular Emacs not macroexpand, while if I start a new one, it
will?  I guess I could have messed up some of the Emacs internals,
somehow?

Hm.  In any case, it looks like this was a false alarm, and your compat
macro works exactly as designed, both in Emacs 28 and in previous
versions.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

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