GNU bug report logs - #41381
28.0.50; Can't compile file containing a local pcase macro

Previous Next

Package: emacs;

Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>

Date: Mon, 18 May 2020 21:24:02 UTC

Severity: normal

Found in version 28.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: Pip Cet <pipcet <at> gmail.com>
Cc: 41381 <at> debbugs.gnu.org
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 <at> gmail.com>:
>
> Philipp Stephani <p.stephani2 <at> 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.




This bug report was last modified 3 years and 296 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.