From: Andreas Schwab <schwab@linux-m68k.org>
To: Helmut Eller <eller.helmut@gmail.com>
Cc: 42691@debbugs.gnu.org
Subject: bug#42691: 28.0.50; eval-and-compile
Date: Mon, 03 Aug 2020 11:29:17 +0200 [thread overview]
Message-ID: <87bljsqdqq.fsf@igel.home> (raw)
In-Reply-To: <m24kpkkvq7.fsf@gmail.com> (Helmut Eller's message of "Mon, 03 Aug 2020 09:57:20 +0200")
On Aug 03 2020, Helmut Eller wrote:
> Compiling this example:
>
> (require 'cl-lib)
> (cl-macrolet ((foo () '123))
> (eval-and-compile (foo)))
>
> with
>
> emacs -Q --batch -f batch-byte-compile bug.el
>
> prints:
>
> In toplevel form:
> bug.el:2:1: Error: Symbol’s function definition is void: foo
>
> I think when compiling eval-and-compile the macro-environment is not
> passed along properly.
Only the body of eval-and-compile is evaluated at that point. If you
want to modify the environment of the evaluation, you need to move that
modification inside the eval-and-compile form.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
next prev parent reply other threads:[~2020-08-03 9:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-03 7:57 bug#42691: 28.0.50; eval-and-compile Helmut Eller
2020-08-03 9:29 ` Andreas Schwab [this message]
2020-08-03 10:27 ` Helmut Eller
2020-08-03 12:04 ` Andreas Schwab
2020-08-03 12:55 ` Helmut Eller
2020-08-03 13:16 ` Andreas Schwab
2021-09-16 15:01 ` Lars Ingebrigtsen
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=87bljsqdqq.fsf@igel.home \
--to=schwab@linux-m68k.org \
--cc=42691@debbugs.gnu.org \
--cc=eller.helmut@gmail.com \
/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.