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

From: Mattias Engdegård <[email-masked]>
Date: Sat, 23 Sep 2023 18:43:24 +0200

23 sep. 2023 kl. 18.08 skrev Stefan Monnier <[email-masked]>:
> 
>> - `declare` is only allowed in named definitions because it is
>> macro-expanded very early, so we have no way of annotating lambda
>> expressions
> 
> It's not because of timing, it's because these `declare` all store their
> info on the symbol (and some of them even fundamentally really apply to
> the name and wouldn't make sense when applied to an anonymous function,
> e.g. obsolescence).

That is true, but some of the declarations might be useful for lambda expressions as well, and more to the point, we don't have any other way to annotate functions in general, only function symbols. Arguably we should invent new syntax for whatever we need, but it would be one more thing to parse.