bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#41381: 28.0.50; Can't compile file containing a local pcase macro


From: Philipp Stephani
Subject: bug#41381: 28.0.50; Can't compile file containing a local pcase macro
Date: Sat, 6 Jun 2020 21:11:26 +0200

Am Mi., 3. Juni 2020 um 23:59 Uhr schrieb Pip Cet <pipcet@gmail.com>:
>
> 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 ...)?

How about neither? This should work without any "eval-when-..." form.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]