all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Dmitry Gutov <dmitry@gutov.dev>, acm@muc.de, 67568@debbugs.gnu.org
Subject: bug#67568: Emacs master: Bug in byte compiler when there's an unused parameter.
Date: Fri, 1 Dec 2023 16:34:18 +0000	[thread overview]
Message-ID: <ZWoLCsCypZT2gEc6@ACM> (raw)
In-Reply-To: <jwv34wmhqxg.fsf-monnier+emacs@gnu.org>

Hello, Stefan.

On Fri, Dec 01, 2023 at 10:40:55 -0500, Stefan Monnier wrote:
> > I have a candidate for the buggy function, namely macroexp-parse-body.

> Duh!
> I think the patch below should fix it.

It certainly will in the test case, yes.

I think I understand the function better now, thanks.

Are you going to commit your patch, or should I?  :-)

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

-- 
Alan Mackenzie (Nuremberg, Germany).





  reply	other threads:[~2023-12-01 16:34 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
2023-12-01 16:34       ` Alan Mackenzie [this message]
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=ZWoLCsCypZT2gEc6@ACM \
    --to=acm@muc.de \
    --cc=67568@debbugs.gnu.org \
    --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.