emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Default lexical-binding to t


From: Sean Whitton
Subject: Re: Default lexical-binding to t
Date: Sun, 03 Nov 2024 14:44:34 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

Hello,

On Sat 02 Nov 2024 at 01:42pm -07, Jim Porter wrote:

> On 11/2/2024 9:24 AM, Stefan Monnier wrote:
>>> Would it make sense to alert/warn the user when loading such a file?
>>> It would cause less confusion to the user when the code is suddenly
>>> not functioning just right.  If there was a warning, she could add the
>>> lexical-binding cookie and call it a day (or nag the package
>>> maintainer about it).
>> We could easily make the code of `load` emit a message when loading
>> a source file without a `lexical-binding` cookie, yes.
>> I did not include such a message in my patch because last time someone
>> suggested such a thing (Mattias, IIRC) it didn't seem very popular.
>> But that's easy to add, and I'd be happy to add it,
>
> I also think lexical-binding is the de facto standard at this point; I'm
> not sure I've seen any dynamic-binding Elisp in a while. (I know it's still
> out there but I've only seen it in very old packages.)

Paredit is a notable example which doesn't have the cookie.

I don't know whether it actually uses any dynamic bindings but I think
there's some chance it does, based on the style of some parts I've read.

-- 
Sean Whitton



reply via email to

[Prev in Thread] Current Thread [Next in Thread]