unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jorgen Schäfer" <contact@jorgenschaefer.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 20139@debbugs.gnu.org
Subject: bug#20139: 25.0.50; eval-buffer ignores lexical-binding
Date: Thu, 19 Mar 2015 08:33:52 +0100	[thread overview]
Message-ID: <CALqDrScO=xe4bBTmE2YqGfH+PG8bqpmJ_d5iq4G6VwOt_Qp4vA@mail.gmail.com> (raw)
In-Reply-To: <jwvk2yd8z2a.fsf-monnier+emacsbugs@gnu.org>

On Thu, Mar 19, 2015 at 4:10 AM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
>> (setq lexical-binding t)
>> (message "%s" (lambda () a))
>
> This is wrong.  The `setq' above is an expression evaluated at run-time,
> whereas what you want to say (that this code is written in the lexical
> version of the Elisp language) is something that needs to be known before
> evaluation proceeds.

I am sorry for the confusion; I added the `setq' form so it is easier
to C-x C-e it. The
bug I describe happens in a buffer with `lexical-binding' set, no
matter which way it
is set. 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)))

Regards,
Jorgen





  reply	other threads:[~2015-03-19  7:33 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 [this message]
2015-03-19  9:56     ` Nicolas Richard
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='CALqDrScO=xe4bBTmE2YqGfH+PG8bqpmJ_d5iq4G6VwOt_Qp4vA@mail.gmail.com' \
    --to=contact@jorgenschaefer.de \
    --cc=20139@debbugs.gnu.org \
    --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 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).