bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#66136: 29.1; byte-compiler reports "misplaced interactive spec" with


From: Jens Schmidt
Subject: bug#66136: 29.1; byte-compiler reports "misplaced interactive spec" with empty fct in lexical environment
Date: Sat, 23 Sep 2023 21:19:48 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Mattias Engdegård <mattias.engdegard@gmail.com> writes:

> Our triptych of meta-forms in function bodies (documentation,
> declare, interactive) is still not handled in a very principled
> or robust way.

Just curious since `macroexp-parse-body' also takes care about it: Where
is `cl-declare' in this picture?  Is it relevant at all?

I'm asking since

------------------------- snip -------------------------
(byte-compile
 '(defun foo ()
    (cl-declare)
    (interactive)))
------------------------- snip -------------------------

gives the same "misplaced interactive spec" warning, but for a different
reason: The `cl-declare' gets replaced by nil somewhere before `m-p-b'
gets called, so `m-p-b' sees and returns:

-------------------- *trace-output* --------------------
1 -> (macroexp-parse-body (nil (interactive)))
1 <- macroexp-parse-body: (nil nil (interactive))
-------------------- *trace-output* --------------------

> [...] Suggested patch attached.

Thanks, will give it a try.





reply via email to

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