[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.
- bug#30078: 27.0.50; Use lexical-binding for M-:, Stefan Monnier, 2018/01/11
- bug#30078: 27.0.50; Use lexical-binding for M-:, Michael Heerdegen, 2018/01/11
- bug#30078: 27.0.50; Use lexical-binding for M-:, Stefan Monnier, 2018/01/12
- bug#30078: 27.0.50; Use lexical-binding for M-:, Stefan Monnier, 2018/01/12
- bug#30078: 27.0.50; Use lexical-binding for M-:, Glenn Morris, 2018/01/12
- bug#30078: 27.0.50; Use lexical-binding for M-:, Michael Heerdegen, 2018/01/12
- bug#30078: 27.0.50; Use lexical-binding for M-:, Stefan Monnier, 2018/01/12
- bug#30078: 27.0.50; Use lexical-binding for M-:,
Michael Heerdegen <=
- bug#30078: 27.0.50; Use lexical-binding for M-:, Stefan Monnier, 2018/01/13
- bug#30078: 27.0.50; Use lexical-binding for M-:, Eli Zaretskii, 2018/01/12
- bug#30078: 27.0.50; Use lexical-binding for M-:, Stefan Monnier, 2018/01/12
- bug#30078: 27.0.50; Use lexical-binding for M-:, Eli Zaretskii, 2018/01/12
- bug#30078: 27.0.50; Use lexical-binding for M-:, Stefan Monnier, 2018/01/12
- bug#30078: 27.0.50; Use lexical-binding for M-:, Eli Zaretskii, 2018/01/12
- bug#30078: 27.0.50; Use lexical-binding for M-:, Noam Postavsky, 2018/01/12
- bug#30078: 27.0.50; Use lexical-binding for M-:, Michael Heerdegen, 2018/01/12
- bug#30078: 27.0.50; Use lexical-binding for M-:, Eli Zaretskii, 2018/01/12
- bug#30078: 27.0.50; Use lexical-binding for M-:, Michael Heerdegen, 2018/01/12