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

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

bug#60450: 30.0.50; Strange behavior of compiler macros in *scratch*


From: Gerd Möllmann
Subject: bug#60450: 30.0.50; Strange behavior of compiler macros in *scratch*
Date: Sat, 31 Dec 2022 14:22:31 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.5.1

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.







reply via email to

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