From: Philipp Stephani <p.stephani2@gmail.com>
To: Alan Mackenzie <acm@muc.de>
Cc: 41618-done@debbugs.gnu.org
Subject: bug#41618: 28.0.50; Can't byte-compile an edebugged macro
Date: Sun, 31 May 2020 19:57:36 +0200 [thread overview]
Message-ID: <CAArVCkQJLHDFCVKZ+0cosNfHy4nYtvWT4XN=f_ehkSqG0EyAXA@mail.gmail.com> (raw)
In-Reply-To: <20200531170119.11733.qmail@mail.muc.de>
Am So., 31. Mai 2020 um 19:01 Uhr schrieb Alan Mackenzie <acm@muc.de>:
>
> Hello, Philipp.
>
> In article <mailman.730.1590857164.2541.bug-gnu-emacs@gnu.org> you wrote:
>
> > 1. Define some arbitrary macro:
>
> > (defmacro foo ())
>
> > 2. Edebug it using C-u C-M-x.
>
> This was not actually relevant. A simple evaluation with C-M-x produces
> the same error.
>
> > 3. Attempt to byte-compile it using M-: (byte-compile 'foo).
>
> > This produces an error:
>
> > Wrong type argument: listp, #[0 "\300\207" [nil] 1]
>
> > The stack trace is
>
> > Debugger entered--Lisp error: (wrong-type-argument listp #f(compiled-function () #<bytecode 0x1e0000171e91>))
> > eval((macro . #f(compiled-function () #<bytecode 0x1e0000171e91>)) t)
> > #f(compiled-function (form) #<bytecode -0x16fada817203f185>)(foo)
> > byte-compile(foo)
> > eval((byte-compile 'foo) t)
> > eval-expression((byte-compile 'foo) nil nil 127)
> > funcall-interactively(eval-expression (byte-compile 'foo) nil nil 127)
> > call-interactively(eval-expression nil nil)
> > command-execute(eval-expression)
>
> This was quite a simple bug. At the end of byte-compile, the code does
> two things:
> (i) If the argument to byte-compile is a symbol, the result is eval'd.
> (ii) If a macro is being compiled, 'macro is pushed onto the result.
>
> When both of these things were necessary, they were being done in the
> wrong order, throwing the error.
>
> I've committed a fix to the emacs-27 branch, and it should reach master
> the next time "somebody" copies the commits over. In the mean time,
> here's that patch, should you want to apply it to your system now:
>
Thanks for the quick fix. Confirmed that it's fixed on the emacs-27 branch.
prev parent reply other threads:[~2020-05-31 17:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-30 16:45 bug#41618: 28.0.50; Can't byte-compile an edebugged macro Philipp Stephani
[not found] ` <mailman.730.1590857164.2541.bug-gnu-emacs@gnu.org>
2020-05-31 17:01 ` Alan Mackenzie
2020-05-31 17:08 ` Eli Zaretskii
2020-05-31 17:41 ` Alan Mackenzie
2020-05-31 17:56 ` Eli Zaretskii
2020-05-31 17:59 ` Philipp Stephani
2020-05-31 18:04 ` Alan Mackenzie
2020-05-31 18:21 ` Eli Zaretskii
2020-05-31 17:57 ` Philipp Stephani [this message]
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='CAArVCkQJLHDFCVKZ+0cosNfHy4nYtvWT4XN=f_ehkSqG0EyAXA@mail.gmail.com' \
--to=p.stephani2@gmail.com \
--cc=41618-done@debbugs.gnu.org \
--cc=acm@muc.de \
/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.