unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Jorgen Schaefer <contact@jorgenschaefer.de>
Cc: 20139@debbugs.gnu.org
Subject: bug#20139: 25.0.50; eval-buffer ignores lexical-binding
Date: Wed, 18 Mar 2015 23:10:30 -0400	[thread overview]
Message-ID: <jwvk2yd8z2a.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <87d2466jr3.fsf@loki.jorgenschaefer.de> (Jorgen Schaefer's message of "Wed, 18 Mar 2015 23:09:04 +0100")

> (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.

You can do M-: (setq lexical-binding t) from that buffer in order to
tell Emacs that the code in the buffer uses the lexical
version of the Elisp language, or better, you should put a "-*-
lexical-binding:t -*-" at the top of the file.


        Stefan





  reply	other threads:[~2015-03-19  3:10 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 [this message]
2015-03-19  7:33   ` Jorgen Schäfer
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=jwvk2yd8z2a.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --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).