[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
- Re: scratch/command 064f146 1/2: Change command to interactive ... modes, (continued)
- Re: scratch/command 064f146 1/2: Change command to interactive ... modes, Lars Ingebrigtsen, 2021/02/16
- Re: scratch/command 064f146 1/2: Change command to interactive ... modes, Lars Ingebrigtsen, 2021/02/17
- Re: scratch/command 064f146 1/2: Change command to interactive ... modes, Stefan Monnier, 2021/02/17
- Re: scratch/command 064f146 1/2: Change command to interactive ... modes, Lars Ingebrigtsen, 2021/02/17
- Re: scratch/command 064f146 1/2: Change command to interactive ... modes, Stefan Monnier, 2021/02/17
- Re: scratch/command 064f146 1/2: Change command to interactive ... modes, Stefan Kangas, 2021/02/17
- Re: scratch/command 064f146 1/2: Change command to interactive ... modes, Stefan Monnier, 2021/02/17
- Re: scratch/command 064f146 1/2: Change command to interactive ... modes, Stefan Kangas, 2021/02/18
- Re: scratch/command 064f146 1/2: Change command to interactive ... modes,
Lars Ingebrigtsen <=
- Re: scratch/command 064f146 1/2: Change command to interactive ... modes, Lars Ingebrigtsen, 2021/02/18
- Re: scratch/command 064f146 1/2: Change command to interactive ... modes, Lars Ingebrigtsen, 2021/02/18
- Re: scratch/command 064f146 1/2: Change command to interactive ... modes, Stefan Monnier, 2021/02/18
- Re: scratch/command 064f146 1/2: Change command to interactive ... modes, Stefan Monnier, 2021/02/18
- Re: scratch/command 064f146 1/2: Change command to interactive ... modes, Basil L. Contovounesios, 2021/02/18
- Re: scratch/command 064f146 1/2: Change command to interactive ... modes, Lars Ingebrigtsen, 2021/02/19
- Re: scratch/command 064f146 1/2: Change command to interactive ... modes, Stefan Monnier, 2021/02/19
- Re: scratch/command 064f146 1/2: Change command to interactive ... modes, Lars Ingebrigtsen, 2021/02/20
- Re: scratch/command 064f146 1/2: Change command to interactive ... modes, Stefan Monnier, 2021/02/20
- Re: scratch/command 064f146 1/2: Change command to interactive ... modes, Lars Ingebrigtsen, 2021/02/20