Subject: bug#66136: 29.1; byte-compiler reports "misplaced interactive spec" with empty fct in lexical environment

From: Stefan Monnier <[email-masked]>
Date: Sat, 23 Sep 2023 18:31:50 -0400

>> 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?

I don't think anybody treats it with much respect and it comes with
a fair share of caveats.  Personally I keep a safe distance from it :-)

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

I think you *have* to place it after the `interactive` if you want it to work.

        Stefan