From: Nicolas Richard <theonewiththeevillook@yahoo.fr>
To: "Jorgen Schäfer" <contact@jorgenschaefer.de>
Cc: 20139@debbugs.gnu.org
Subject: bug#20139: 25.0.50; eval-buffer ignores lexical-binding
Date: Thu, 19 Mar 2015 10:56:37 +0100 [thread overview]
Message-ID: <87bnjpgvje.fsf@yahoo.fr> (raw)
In-Reply-To: <CALqDrScO=xe4bBTmE2YqGfH+PG8bqpmJ_d5iq4G6VwOt_Qp4vA@mail.gmail.com> ("Jorgen \=\?utf-8\?Q\?Sch\=C3\=A4fer\=22's\?\= message of "Thu, 19 Mar 2015 08:33:52 +0100")
Jorgen Schäfer <contact@jorgenschaefer.de> writes:
> . I.e. the following snippet will message (lambda nil t) and
> then (closure (t) nil t):
>
> (with-temp-buffer
> (setq lexical-binding t)
> (insert "(message \"%S\" (lambda () t))")
> (eval-buffer)
> (eval-region (point-min) (point-max)))
And this will reverse the behaviour :
(with-temp-buffer
(insert ";; -*- lexical-binding: t; -*-\n(message \"%S\" (lambda () t))")
(eval-buffer)
(eval-region (point-min) (point-max)))
IOW eval-buffer obeys the "file"-local variable by calling
specbind (Qlexical_binding, lisp_file_lexically_bound_p (buf) ? Qt : Qnil);
while eval-region simply uses the current value of lexical-binding.
--
Nicolas
next prev parent reply other threads:[~2015-03-19 9:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-18 22:09 bug#20139: 25.0.50; eval-buffer ignores lexical-binding Jorgen Schaefer
2015-03-19 3:10 ` Stefan Monnier
2015-03-19 7:33 ` Jorgen Schäfer
2015-03-19 9:56 ` Nicolas Richard [this message]
2015-03-19 14:15 ` Stefan Monnier
[not found] ` <CALqDrSccFR=TMo=r96v_ODCJbq=afrcaXCse77shekyRWwEyxA@mail.gmail.com>
[not found] ` <jwvmw3959zl.fsf-monnier+emacsbugs@gnu.org>
2015-03-19 14:52 ` Jorgen Schäfer
2015-03-19 16:28 ` Stefan Monnier
2019-10-07 15:25 ` Lars Ingebrigtsen
2015-03-19 15:49 ` Glenn Morris
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=87bnjpgvje.fsf@yahoo.fr \
--to=theonewiththeevillook@yahoo.fr \
--cc=20139@debbugs.gnu.org \
--cc=contact@jorgenschaefer.de \
/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).