GNU bug report logs - #66136
29.1; byte-compiler reports "misplaced interactive spec" with empty fct in lexical environment

Previous Next

Package: emacs;

Reported by: "Jens Schmidt" <jschmidt4gnu <at> vodafonemail.de>

Date: Thu, 21 Sep 2023 13:12:02 UTC

Severity: normal

Found in version 29.1

Done: Mattias Engdegård <mattias.engdegard <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
To: Mattias Engdegård <mattias.engdegard <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, Stefan Monnier <monnier <at> iro.umontreal.ca>, 66136 <at> debbugs.gnu.org
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
Mattias Engdegård <mattias.engdegard <at> 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.




This bug report was last modified 1 year and 299 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.