Subject: bug#74145: 31.0.50; Default lexical-binding to t

From: Stefan Kangas <[email-masked]>
Date: Tue, 11 Mar 2025 18:25:23 -0500

Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <[email-masked]> writes:

>>   > E.g. "why don't we start by warning when we load files
>>   > without the lexical-binding cookie?":
>>
>>   >     https://lists.gnu.org/r/emacs-devel/2024-05/msg00250.html
>>
>>   > I don't have any new answers to those questions.
>>
>> Are you ok with our implementing that warning now?
>
> Of course.  For me, the purpose of this bug#74145 is not to see *if* we
> can change the default but *how*, or rather under which conditions.
>
> The point of introducing the change early on during the Emacs-31
> development is to have ample time to implement (and tune) whichever
> mitigating measure we find to be necessary.
>
> And I doubt we'll figure what is necessary before we actually make the
> change on `master`.

I agree with Stefan Monnier.  Changing the default on `master` seems
like a good way to uncover any potential showstoppers early, so we can
base any mitigating measures on real and relevant issues, not just
hypotheticals.

Some things we can anticipate, of course, but without flipping the
default, I'm concerned that some of the proposed precautions rely too
heavily on hunches and guesswork.  Prior experience is valuable and
important, but it's no substitute for observing how things actually
play out in practice.