[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 15:45:42 +0200 |
> From: Stefan Kangas <stefankangas@gmail.com>
> Date: Fri, 8 Nov 2024 12:11:34 +0000
> Cc: christopher@librehacker.com, acm@muc.de, joostkremers@fastmail.fm,
> emacs-devel@gnu.org
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> 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.
>
> I don't consider this as much more than a gentle nudge and reminder.
Why is there a need to nudge someone who already took the necessary
action?
> The mode line indicator has been with us for a few releases already, and
> I personally don't see compelling reasons to change that decision now.
We could remove the warning face from the indication if the setting is
explicit. Would that be a problem?
- Re: Default lexical-binding to t, (continued)
- Re: Default lexical-binding to t, Christopher Howard, 2024/11/07
- Re: Default lexical-binding to t, Stefan Kangas, 2024/11/07
- Re: Default lexical-binding to t, Eli Zaretskii, 2024/11/08
- Re: Default lexical-binding to t, Stefan Kangas, 2024/11/08
- Re: Default lexical-binding to t, Suhail Singh, 2024/11/08
- Re: Default lexical-binding to t, Stefan Kangas, 2024/11/08
- Re: Default lexical-binding to t,
Eli Zaretskii <=
Re: Default lexical-binding to t, Eli Zaretskii, 2024/11/08