From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Alan Mackenzie <acm@muc.de>
Cc: Dmitry Gutov <dmitry@gutov.dev>, 67568@debbugs.gnu.org
Subject: bug#67568: Emacs master: Bug in byte compiler when there's an unused parameter.
Date: Fri, 01 Dec 2023 10:40:55 -0500 [thread overview]
Message-ID: <jwv34wmhqxg.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <ZWn6MIMSwRx2LqCe@ACM> (Alan Mackenzie's message of "Fri, 1 Dec 2023 15:22:24 +0000")
> I have a candidate for the buggy function, namely macroexp-parse-body.
Duh!
I think the patch below should fix it.
Stefan
diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el
index 6eb670d6dc1..6ed3e0c4896 100644
--- a/lisp/emacs-lisp/macroexp.el
+++ b/lisp/emacs-lisp/macroexp.el
@@ -540,7 +540,9 @@ macroexp-parse-body
(while
(and body
(let ((e (car body)))
- (or (stringp e)
+ (or (and (stringp e)
+ ;; Only the first string can be a docstring.
+ (not (delq nil (mapcar #'stringp decls))))
(memq (car-safe e)
'(:documentation declare interactive cl-declare)))))
(push (pop body) decls)))
next prev parent reply other threads:[~2023-12-01 15:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-01 12:49 bug#67568: Emacs master: Bug in byte compiler when there's an unused parameter Alan Mackenzie
2023-12-01 13:06 ` Dmitry Gutov
2023-12-01 14:16 ` Alan Mackenzie
2023-12-01 15:22 ` Alan Mackenzie
2023-12-01 15:40 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-12-01 16:34 ` Alan Mackenzie
2023-12-03 15:55 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-03 16:21 ` Eli Zaretskii
2023-12-03 19:24 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-03 19:28 ` Eli Zaretskii
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=jwv34wmhqxg.fsf-monnier+emacs@gnu.org \
--to=bug-gnu-emacs@gnu.org \
--cc=67568@debbugs.gnu.org \
--cc=acm@muc.de \
--cc=dmitry@gutov.dev \
--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.