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: Eli Zaretskii
Subject: Re: Default lexical-binding to t
Date: Fri, 08 Nov 2024 09:27:54 +0200

> From: Stefan Kangas <stefankangas@gmail.com>
> Date: Fri, 8 Nov 2024 00:38:08 +0000
> Cc: Joost Kremers <joostkremers@fastmail.fm>, emacs-devel@gnu.org
> 
> Christopher Howard <christopher@librehacker.com> writes:
> 
> > Hi, I just wanted to mention one little thing (feature request?): I
> > noticed that, if I include this
> >
> > ``` ;;; ...  -*- lexical-binding: nil -*- ```
> >
> > in order to purposefully set the lexical-binding to dynamic — I'm a
> > rebel, I guess — then the mode-line still gives the "/d" a warning
> > face. In my theme, that shows up as bright red. But if I set it to "t"
> > instead, then I get a "/l" without a warning color. I don't see why,
> > if I purposely chose dynamic binding, that Emacs should treat it as a
> > bad thing which I need to be warned about.
> 
> Yes, that is on purpose.  See (info "(elisp) Coding Conventions"):
> 
>    • We recommend enabling ‘lexical-binding’ in new code, and converting
>      existing Emacs Lisp code to enable ‘lexical-binding’ if it doesn't
>      already.  *Note Selecting Lisp Dialect::.

I don't think this justifies nagging a user who explicitly wants some
file(s) to be treated as using dynamic binding.  The above is just a
recommendation, not a hard requirement.  We are not going to remove
dynamic binding from Emacs, are we?  Then why annoy people who want to
use it, for presumably good reasons?



reply via email to

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