From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Jens Schmidt <jschmidt4gnu@vodafonemail.de>, 66136@debbugs.gnu.org
Subject: bug#66136: 29.1; byte-compiler reports "misplaced interactive spec" with empty fct in lexical environment
Date: Fri, 22 Sep 2023 10:59:21 -0400 [thread overview]
Message-ID: <jwvzg1e8e1g.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <838r8y92aw.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 22 Sep 2023 08:58:47 +0300")
>> Date: Thu, 21 Sep 2023 23:39:47 +0200
>> From: Jens Schmidt via "Bug reports for GNU Emacs,
>> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>>
>> Found the issue I think:
>>
>> -------------------- bad case --------------------
>> (macroexp-parse-body '("Allows interactive calls." (interactive "^P")))
>>
>> =>
>>
>> (("Allows interactive calls.")
>> (interactive "^P"))
>> -------------------- bad case --------------------
>>
>> -------------------- good case --------------------
>> (macroexp-parse-body '("Allows interactive calls." (interactive "^P") nil))
>>
>> =>
>>
>> (("Allows interactive calls." (interactive "^P"))
>> nil)
>> -------------------- good case --------------------
>>
>> That is, macroexp-parse-body does not consider the case that a body can
>> consist of declarations only and, if this is the case, puts the last
>> declaration into the body forms.
>>
>> Could provide a patch if somebody confirms that this is really the root
>> cause of this issue. Yet on the other hand this is pretty deep elisp,
>> so if somebody else steps forward, I'll be glad as well.
>
> Adding Stefan, in case he has comments/suggestions.
I'm in favor of requiring *something* after the declarations.
So yes, the first case above is a bug and should be fixed, but rather
than return
(("Allows interactive calls." (interactive "^P"))
nil)
I think it should return something like
(("Allows interactive calls." (interactive "^P"))
,(macroexp-warn-and-return "Missing body" ...))
-- Stefan
next prev parent reply other threads:[~2023-09-22 14:59 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-21 10:44 bug#66136: 29.1; byte-compiler reports "misplaced interactive spec" with empty fct in lexical environment Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-21 20:20 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-21 21:39 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-22 5:58 ` Eli Zaretskii
2023-09-22 14:59 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-09-22 21:26 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-22 21:39 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-22 22:41 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-23 10:46 ` Mattias Engdegård
2023-09-23 16:08 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-23 16:43 ` Mattias Engdegård
2023-09-23 19:01 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-24 10:42 ` Mattias Engdegård
2023-09-24 15:42 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-23 19:19 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-23 22:31 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-25 10:24 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-25 13:22 ` Mattias Engdegård
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvzg1e8e1g.fsf-monnier+emacs@gnu.org \
--to=bug-gnu-emacs@gnu.org \
--cc=66136@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=jschmidt4gnu@vodafonemail.de \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.