unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#30301: 26.0.91; setting lexical-binding with C-M-x vs M-x eval-buffer
@ 2018-01-31 10:41 Charles A. Roelli
  2019-10-09 21:31 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Charles A. Roelli @ 2018-01-31 10:41 UTC (permalink / raw)
  To: 30301

From the *scratch* buffer in emacs -q, type:

(setq-local lexical-binding t) M-x eval-buffer RET

Afterwards, M-: lexical-binding RET shows "nil", but I expect to see
"t".

If you instead type C-M-x in *scratch*, then M-: lexical-binding RET
does show "t".

For recent discussion also see Bug#30078, which is about turning on
lexical-binding in M-: (eval-expression) -- a different but related
issue.





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#30301: 26.0.91; setting lexical-binding with C-M-x vs M-x eval-buffer
  2018-01-31 10:41 bug#30301: 26.0.91; setting lexical-binding with C-M-x vs M-x eval-buffer Charles A. Roelli
@ 2019-10-09 21:31 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-09 21:31 UTC (permalink / raw)
  To: Charles A. Roelli; +Cc: 30301

charles@aurox.ch (Charles A. Roelli) writes:

>>From the *scratch* buffer in emacs -q, type:
>
> (setq-local lexical-binding t) M-x eval-buffer RET
>
> Afterwards, M-: lexical-binding RET shows "nil", but I expect to see
> "t".
>
> If you instead type C-M-x in *scratch*, then M-: lexical-binding RET
> does show "t".

This is how eval-buffer is meant to work -- it'll ignore any setting of
lexical-binding and just looks for

  -*- lexical-binding: t -*-

cookies and uses that instead.  This wasn't documented, though, but that
has been fixed on the trunk now.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-09 21:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-31 10:41 bug#30301: 26.0.91; setting lexical-binding with C-M-x vs M-x eval-buffer Charles A. Roelli
2019-10-09 21:31 ` Lars Ingebrigtsen

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