bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#30078: 27.0.50; Use lexical-binding for M-:


From: Michael Heerdegen
Subject: bug#30078: 27.0.50; Use lexical-binding for M-:
Date: Fri, 12 Jan 2018 20:35:44 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

> I'm not sure we should try to encourage the user to think a piece of
> code can check the value of `lexical-binding` to know if it's being
> evaluated using lexical scoping rules.

I'm not sure, too.  But aren't *scratch* and *ielm* special?  These are
the current buffers when code is evaluated, but they are also some kind
of source-code buffer at the same time.  In source code file buffers,
M-x lexical-binding RET gives you the right answer about how the code in
this buffers is interpreted.

I think we should be careful - maybe new users are trying to learn Elisp
with the help of *ielm*.

With your patch, you get

ELISP> (let ((x 1)) (lambda () x))
(closure
 ((x . 1)
  t)
 nil x)

but if you put point after the input expression and hit C-x C-e you
suddenly get

(lambda nil x)

People who are actually learning Elisp will not make any sense out of
this, I think.


Michael.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]