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

From: Michael Heerdegen <[email-masked]>
Date: Fri, 12 Jan 2018 21:55:25 +0100

Eli Zaretskii <[email-masked]> writes:

> Then you are saying that turning on lexical-binding in *scratch* will
> change nothing at all?  I very much doubt that, and my witness are
> all those packages that broke due to lexical-binding and needed minor
> fixes.

I do what has been proposed for months.  I liked it.

What are we doing with scratch?

(1) Setting global variables, defining small functions and such simple
stuff.  lexical-binding doesn't make a big difference here.

(2) Re-evaluate parts of the source code, often with small
modifications, for testing and debugging.  Since more and more packages
make active use of lexical-binding, this is actually broken currently!
Re-evaluating parts of source code in scratch can currently break Emacs.

(3) I often posted some code examples in emacs-help which made use of
lexical-binding.  People pasted it into scratch and it didn't work.
It's currently even not trivial to evaluate such examples with
lexical-binding on.

OTOH, there is not too much code that really relies on dynamical binding
mode.  And very often, such code is just written in a bad style (missing
`defvar's etc.).

In summary, I think the advantages clearly prevail.

Michael.