From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: "Gerd Möllmann" <gerd.moellmann@gmail.com>
Cc: 60450@debbugs.gnu.org
Subject: bug#60450: 30.0.50; Strange behavior of compiler macros in *scratch*
Date: Mon, 08 May 2023 08:25:41 -0400 [thread overview]
Message-ID: <jwvv8h3nhjl.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <d14aa519-69ce-b71e-4c07-6c654a28ab03@gmail.com> ("Gerd Möllmann"'s message of "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)."
`cl-define-compiler-macro` is built on top of the "new" ELisp compiler
macro feature. I think that feature is documented vaguely (poorly?)
enough that it does allow expansion (or not) for interpreted code.
> 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.
Trying to distinguish those calls to `macroexpand-all` which come from
the compiler from those that come from elsewhere doesn't seem worth the
trouble, so I'd rather consider it as a doc bug.
The doc should also make it clear that contrary to `defmacro` there is
no guarantee that it will be called (nor *when* it's called).
Stefan
next prev parent reply other threads:[~2023-05-08 12:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvv8h3nhjl.fsf-monnier+emacs@gnu.org \
--to=bug-gnu-emacs@gnu.org \
--cc=60450@debbugs.gnu.org \
--cc=gerd.moellmann@gmail.com \
--cc=monnier@iro.umontreal.ca \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.