GNU bug report logs - #60450
30.0.50; Strange behavior of compiler macros in *scratch*

Previous Next

Package: emacs;

Reported by: Gerd Möllmann <gerd.moellmann <at> gmail.com>

Date: Sat, 31 Dec 2022 13:23:01 UTC

Severity: normal

Found in version 30.0.50

Fixed in version 30.1

Done: Gerd Möllmann <gerd.moellmann <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: 60450 <at> debbugs.gnu.org
Subject: bug#60450: 30.0.50; Strange behavior of compiler macros in *scratch*
Date: Sat, 31 Dec 2022 14:22:31 +0100
The doc string of cl-define-compiler-macro says

  "This is like ‘defmacro’, but macro expansion occurs only if the call 
to FUNC is compiled (i.e., not interpreted)."

Evaluate the following compiler macro and function in *scratch*:

(cl-define-compiler-macro foo ()
  1)

(defun foo ()
  2)

Then:

(eval '(foo))
  => 2

(foo)C-j
  => 1

C-j is bound to eval-print-last-sexp, which I wouldn't expect to compile 
anything, and its doc string doesn't mention anything AFAICS.  Not sure 
if that's a bug in the code or something missing in the docs.






This bug report was last modified 1 year and 97 days ago.

Previous Next


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