From: Pip Cet <pipcet@gmail.com>
To: Philipp Stephani <p.stephani2@gmail.com>
Cc: 41381@debbugs.gnu.org
Subject: bug#41381: 28.0.50; Can't compile file containing a local pcase macro
Date: Wed, 03 Jun 2020 21:59:36 +0000 [thread overview]
Message-ID: <87pnaf6caf.fsf@gmail.com> (raw)
In-Reply-To: <wvr4k119djjn.fsf@gmail.com> (Philipp Stephani's message of "Mon, 18 May 2020 23:23:24 +0200")
Philipp Stephani <p.stephani2@gmail.com> writes:
> $ cat test.el
> ;;; -*- lexical-binding: t; -*-
> (pcase-defmacro test () '_)
> (defun test () (pcase nil ((test))))
>
> $ emacs -Q -batch -l bytecomp -f batch-byte-compile test.el
>
> In toplevel form:
> test.el:3:1: Error: Symbol’s function definition is void: test--pcase-macroexpander
>
> It works if the pcase macro is surrounded with `eval-when-compile', but
> that shouldn't be necessary I think.
Wouldn't it be better to surround the pcase-defmacro call with
(eval-and-compile ...)?
I think it would be great if there were some clever way to make eager
macro expansion less eager, so things like evaluating the following two
expressions one after another
(defmacro foo () 3)
(progn
(defmacro foo () 4)
(foo))
would produce the right result (4 rather than 3). That would solve this
problem as well, but it's probably impossible to do with reasonable
performance.
next prev parent reply other threads:[~2020-06-03 21:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-18 21:23 bug#41381: 28.0.50; Can't compile file containing a local pcase macro Philipp Stephani
2020-06-03 21:59 ` Pip Cet [this message]
2020-06-06 19:11 ` Philipp Stephani
2020-06-07 9:57 ` Michael Heerdegen
2021-07-31 16:34 ` Lars Ingebrigtsen
2021-07-31 16:39 ` Philipp
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pnaf6caf.fsf@gmail.com \
--to=pipcet@gmail.com \
--cc=41381@debbugs.gnu.org \
--cc=p.stephani2@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).