unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#60450: 30.0.50; Strange behavior of compiler macros in *scratch*
@ 2022-12-31 13:22 Gerd Möllmann
  2022-12-31 14:42 ` Andreas Schwab
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Gerd Möllmann @ 2022-12-31 13:22 UTC (permalink / raw)
  To: 60450

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.







^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-05-18  6:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-31 13:22 bug#60450: 30.0.50; Strange behavior of compiler macros in *scratch* Gerd Möllmann
2022-12-31 14:42 ` Andreas Schwab
2023-01-01  6:34   ` Gerd Möllmann
2023-05-08  1:59 ` Lynn Winebarger
2023-05-08 11:29   ` Eli Zaretskii
2023-05-08 12:25 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-18  6:33   ` Gerd Möllmann

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).