From: David Engster <deng@randomsample.de>
To: 13813@debbugs.gnu.org
Subject: bug#13813: 24.3.50; eval-and-compile in macro inhibits let-binding of variable
Date: Mon, 25 Feb 2013 17:58:41 +0100 [thread overview]
Message-ID: <87d2vo5nzy.fsf@engster.org> (raw)
Recipe:
* Create a file test.el with the following contents:
(defvar myflag nil)
(defmacro mytestmacro ()
"An eval-and-compile test."
`(eval-and-compile (mytestfun)))
(defun mytestfun ()
(when myflag
(message "foo")))
(let ((myflag t))
;; Should display "foo"
(mytestmacro))
* Now call with Emacs from trunk:
emacs --batch -l test.el
* "foo" should be displayed, but isn't. The Emacs 24.2.93 pretest
however works as expected.
* Note the following:
- It works if you just 'setq' the 'myflag' variable
- If you load the file interactively and call `eval-buffer', it will
also output nothing. However, if you manually evaluate the last
expression through C-x C-e, it will work.
- The same problem occurs with `eval-when-compile', but everything
works with `progn'.
Best,
David "who will never grasp eval-and-compile"
And yes, Stefan, this bug turned up in the EIEIO test suite. :-)
next reply other threads:[~2013-02-25 16:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-25 16:58 David Engster [this message]
2013-02-25 20:53 ` bug#13813: 24.3.50; eval-and-compile in macro inhibits let-binding of variable Stefan Monnier
2013-02-25 21:17 ` David Engster
2013-03-11 18:15 ` Stefan Monnier
2013-03-11 20:57 ` David Engster
2013-03-12 2:48 ` Stefan Monnier
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=87d2vo5nzy.fsf@engster.org \
--to=deng@randomsample.de \
--cc=13813@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).