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

From: Visuwesh <[email-masked]>
Date: Tue, 18 Feb 2025 17:25:45 +0530

[புதன் பிப்ரவரி 19, 2025] Phil Sainty wrote:

> dancol wrote:
>> It's been many years now. Everyone has had enough time to adapt to
>> lexical-binding.
>
> I'm sure a majority of elisp programmers are aware of lexical-binding
> by this point, and (in a great many cases) have adapted to it; but,
> with the exception of those who are following current developments,
> nobody has had ANY time to adapt to the idea that lexical-binding is
> the DEFAULT.  Users having time to adapt to THAT begins with the first
> release that warns that it's going to happen, and we haven't had one
> of those yet.
>
> Even the users who understand Emacs Lisp should have advance warning
> of such a change so that they can make the necessary changes in
> advance of that change coming into effect.
>
> Emacs is not only used by elisp programmers, though.  Many users don't
> understand elisp; will not understand dynamic-vs-lexical binding; and
> will not know why the libraries they have been using for many years
> suddenly don't work properly.
>
> Those users should be informed that they need to change something
> before it has a chance to break things, so this should be sign-posted
> for a long time in advance of the actual change, so that users really
> do have time to adapt.

+1.  It is also a bit time consuming to change code to follow lexical
binding and AFAIU from reading the list, there is no straightforward way
to do so.  Despite that, I hope there could be some addition to the
manual to outline the rough pathway one may follow. If not possible,
then at least some tricks or trips to ensure that one has successfully
changed the code to follow lexical binding for the most part.  Any bugs
hidden would be uncovered soon enough with regular usage of the
converted code.