[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#66136: 29.1; byte-compiler reports "misplaced interactive spec" with
From: |
Mattias Engdegård |
Subject: |
bug#66136: 29.1; byte-compiler reports "misplaced interactive spec" with empty fct in lexical environment |
Date: |
Sat, 23 Sep 2023 12:46:50 +0200 |
22 sep. 2023 kl. 23.39 skrev Stefan Monnier <monnier@iro.umontreal.ca>:
> I know Mattias played with this part of the code (mostly to try and
> figure what to do about the ordering of the various possible kinds of
> declarations, which is a related yet different issue). Maybe he has
> a more informed opinion.
Can't lay much claim to that I'm afraid. In this case I'd just have
macroexp-parse-body return an empty body and be done with it. Suggested patch
attached.
Our triptych of meta-forms in function bodies (documentation, declare,
interactive) is still not handled in a very principled or robust way. We keep
parsing and re-parsing them in several places. I'm tempted to replace lambda
with an intermediate form where these things are already parsed, early in the
front-end (maybe even macroexpand-all).
There are all sorts of little annoyances, such as:
- if nothing comes after a (literal) doc string, the doc string also becomes
the function body
- `declare` is only allowed in named definitions because it is macro-expanded
very early, so we have no way of annotating lambda expressions
- not sure :documentation is handled correctly everywhere since it's a late
addition
- that 'misplaced interactive spec' warning shouldn't be emitted from the Lisp
optimiser at all but fully handled in the front-end like all syntax errors
macroexp-parse-body.diff
Description: Binary data
- bug#66136: 29.1; byte-compiler reports "misplaced interactive spec" with empty fct in lexical environment, Jens Schmidt, 2023/09/21
- bug#66136: 29.1; byte-compiler reports "misplaced interactive spec" with empty fct in lexical environment, Jens Schmidt, 2023/09/21
- bug#66136: 29.1; byte-compiler reports "misplaced interactive spec" with empty fct in lexical environment, Jens Schmidt, 2023/09/21
- bug#66136: 29.1; byte-compiler reports "misplaced interactive spec" with empty fct in lexical environment, Eli Zaretskii, 2023/09/22
- bug#66136: 29.1; byte-compiler reports "misplaced interactive spec" with empty fct in lexical environment, Stefan Monnier, 2023/09/22
- bug#66136: 29.1; byte-compiler reports "misplaced interactive spec" with empty fct in lexical environment, Jens Schmidt, 2023/09/22
- bug#66136: 29.1; byte-compiler reports "misplaced interactive spec" with empty fct in lexical environment, Stefan Monnier, 2023/09/22
- bug#66136: 29.1; byte-compiler reports "misplaced interactive spec" with empty fct in lexical environment, Jens Schmidt, 2023/09/22
- bug#66136: 29.1; byte-compiler reports "misplaced interactive spec" with empty fct in lexical environment,
Mattias Engdegård <=
- bug#66136: 29.1; byte-compiler reports "misplaced interactive spec" with empty fct in lexical environment, Stefan Monnier, 2023/09/23
- bug#66136: 29.1; byte-compiler reports "misplaced interactive spec" with empty fct in lexical environment, Mattias Engdegård, 2023/09/23
- bug#66136: 29.1; byte-compiler reports "misplaced interactive spec" with empty fct in lexical environment, Stefan Monnier, 2023/09/23
- bug#66136: 29.1; byte-compiler reports "misplaced interactive spec" with empty fct in lexical environment, Mattias Engdegård, 2023/09/24
- bug#66136: 29.1; byte-compiler reports "misplaced interactive spec" with empty fct in lexical environment, Stefan Monnier, 2023/09/24
- bug#66136: 29.1; byte-compiler reports "misplaced interactive spec" with empty fct in lexical environment, Jens Schmidt, 2023/09/23
- bug#66136: 29.1; byte-compiler reports "misplaced interactive spec" with empty fct in lexical environment, Stefan Monnier, 2023/09/23
- bug#66136: 29.1; byte-compiler reports "misplaced interactive spec" with empty fct in lexical environment, Jens Schmidt, 2023/09/25
- bug#66136: 29.1; byte-compiler reports "misplaced interactive spec" with empty fct in lexical environment, Mattias Engdegård, 2023/09/25