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

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Date: Thu, 11 Jan 2018 16:38:01 UTC

Severity: wishlist

Found in version 27.0.50

Fixed in version 27.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #38 received at 30078 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 30078 <at> debbugs.gnu.org
Subject: Re: bug#30078: 27.0.50; Use lexical-binding for M-:
Date: Fri, 12 Jan 2018 20:35:44 +0100
Stefan Monnier <monnier <at> 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.




This bug report was last modified 6 years and 24 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.