[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: |
Fri, 19 Feb 2021 13:07:47 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> I just installed a fix for that, which makes Edebug reuse the normal
> `eval-defun` code.
Great! And I can confirm that `C-M-x' in Emacs 28 works fine now in
this use case.
(defun foo-command1 ()
(future-interactive nil emacs-lisp-mode)
(+ 1 2))
(symbol-function 'foo-command1)
=> (lambda nil (interactive nil emacs-lisp-mode) (+ 1 2))
However, `C-u C-M-x' gives us:
(symbol-function 'foo-command1)
=> (lambda nil (edebug-enter 'foo-command1 (list) #'(lambda nil (edebug-after
(edebug-before 0) 1 (interactive nil emacs-lisp-mode)) (edebug-after
(edebug-before 2) 3 (+ 1 2)))))
Note the placement of the `interactive' form -- so this isn't a command
now. Compare with a non-macro `interactive':
(defun foo-command2 ()
(interactive nil emacs-lisp-mode)
(+ 1 2))
(symbol-function 'foo-command2)
=> (lambda nil (interactive) (edebug-enter 'foo-command2 (list) #'(lambda nil
(edebug-after (edebug-before 0) 1 (+ 1 2)))))
--
(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/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, 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 <=
- 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
- Re: scratch/command 064f146 1/2: Change command to interactive ... modes, Jose A. Ortega Ruiz, 2021/02/14
- Re: scratch/command 064f146 1/2: Change command to interactive ... modes, Stefan Monnier, 2021/02/14
- Re: scratch/command 064f146 1/2: Change command to interactive ... modes, Basil L. Contovounesios, 2021/02/14
- Re: scratch/command 064f146 1/2: Change command to interactive ... modes, Stefan Kangas, 2021/02/14
- Re: scratch/command 064f146 1/2: Change command to interactive ... modes, Basil L. Contovounesios, 2021/02/14
- Re: scratch/command 064f146 1/2: Change command to interactive ... modes, Stefan Kangas, 2021/02/14