Subject: Re: bug#66706: [PATCH] Automatic elisp dialect insertion

From: Dmitry Gutov <[email-masked]>
Date: Wed, 25 Oct 2023 16:06:43 +0300

On 25/10/2023 15:03, Eli Zaretskii wrote:
>> From: Stefan Monnier<[email-masked]>
>> Cc: Eli Zaretskii<[email-masked]>,  Mattias Engdegård
>>   <[email-masked]>,[email-masked],
>>    [email-masked]
>> Date: Tue, 24 Oct 2023 22:01:25 -0400
>>
>> Just to be clear: the long term goal is to eliminate the dynbind
>> dialect, or at least make it be an opt-in that requires taking extra
>> steps, such as adding a cookie to the file, whereas the lexbind dialect
>> should be the default.  Not because dynbind is evil.  Not because it
>> imposes an undue burden on the implementation.
>> But because having two dialects imposes an undue burden on our users.
>> Those who read all the docs may not care, but all the others are
>> vulnerable to the usual "I copied the code from that webpage and it
>> doesn't work" because the code on that webpage used the other dialect.
>>
>> So the question is how to move from here to there in the least
>> painful way and I believe that inserting this cookie by default is a step
>> that will make this transition less painful.
> I thought we already decided on that: we should make lexical-binding
> the default at some point.  Until then, I see no reason why the
> prominent indication on the mode line should not be enough.

I wasn't aware of that indication myself, FWIW. Or forgot.

Regarding intermediate steps toward making 'lexical-binding: t' the 
default, are you of the opinion that we've made enough of them now? And 
will just be able to flip the default in some future release?

All in all, I'd say the byte-compilation warning "file has no 
‘lexical-binding’ directive" which we already show might suffice. But it 
only helps after the user learns how to byte-compile files and/or enable 
flymake-mode.