unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: 60450@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	[thread overview]
Message-ID: <d14aa519-69ce-b71e-4c07-6c654a28ab03@gmail.com> (raw)

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	other threads:[~2022-12-31 13:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-31 13:22 Gerd Möllmann [this message]
2022-12-31 14:42 ` bug#60450: 30.0.50; Strange behavior of compiler macros in *scratch* 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d14aa519-69ce-b71e-4c07-6c654a28ab03@gmail.com \
    --to=gerd.moellmann@gmail.com \
    --cc=60450@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).