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

From: Mattias Engdegård <[email-masked]>
Date: Thu, 26 Oct 2023 10:32:47 +0200

26 okt. 2023 kl. 02.07 skrev Jim Porter <[email-masked]>:

> Assuming we don't want to flip the default for 'lexical-binding' just yet, would it be possible to warn the user any time they load interpreted code that uses dynamic binding?

If you mean .el files without a cookie, then definitely yes.

> We could potentially do the same for .elc files that were implicitly compiled with dynamic binding (i.e. without a "lexical-binding: nil" cookie), but in my opinion it would suffice to warn users when they recompile that file.

Not sure how you would detect that.
Ideally we should try to find a way to recompile code (and emit warnings) without inconveniencing the user too much.

> Or we could just flip the default now.

If we had a modest pot of money, we could sponsor young and coming (or old and going) programmers for converting code using dynamic binding that is still in regular use.