emacs-devel
[Top][All Lists]
Advanced

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

Re: Why is lexical-binding's global value ignored?


From: Jean Louis
Subject: Re: Why is lexical-binding's global value ignored?
Date: Sun, 29 Jan 2023 12:36:00 +0300
User-agent: Mutt/2.2.9+54 (af2080d) (2022-11-21)

* tomas@tuxteam.de <tomas@tuxteam.de> [2023-01-28 10:12]:
> On Fri, Jan 27, 2023 at 08:01:47PM -0700, abq@bitrot.link wrote:
> > If somebody does (setq-default lexical-binding t), the intention is obvious.
> > But in current versions of Emacs, when loading a file that doesn't specify a
> > local value for lexical-binding, the global value is ignored. Why?
> > 
> > IOW, what would break if the global value were honored? It defaults to nil,
> > which is already how files are loaded if no local value is specified, so
> > honoring the global wouldn't change anything by default.
> 
> I think it's backward compatibility, mainly. Files with no explicit
> lexical binding setting (may) contain code which expects dynamic
> binding and would break.

Some programs cannot work with lexical binding turned on.

Such is the RCD Template Interpolation System for Emacs:
https://hyperscope.link/3/7/1/3/3/RCD-Template-Interpolation-System-for-Emacs.html

I use that package for text based spreadsheet-like calculations.

Demonstration here:
https://gnu.support/images/2022/11/2022-11-11/2022-11-11-11:11:11.ogv

Calling it from lexical bindings works only with modified `rcd-dlet'
function, how it was in it's original. 

Calling is one aspect of it.

Other application that does not work with lexical binding is `eev' package.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



reply via email to

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