From: <tomas@tuxteam.de>
To: emacs-devel@gnu.org
Subject: Re: Why is lexical-binding's global value ignored?
Date: Mon, 30 Jan 2023 13:59:52 +0100 [thread overview]
Message-ID: <Y9e/SPB1K/n/r7D1@tuxteam.de> (raw)
In-Reply-To: <83r0vc5hj9.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1154 bytes --]
On Mon, Jan 30, 2023 at 02:32:58PM +0200, Eli Zaretskii wrote:
> > Date: Sun, 29 Jan 2023 20:53:30 -0700
> > From: abq@bitrot.link
> > Cc: emacs-devel@gnu.org
> >
> > On 2023-01-28 23:54, Eli Zaretskii wrote:
> > > Wasn't that already explained? What happens if you say
> > >
> > > (setq-default lexical-binding t)
> > >
> > > and then load a Lisp file that expects dynamic-binding by default?
> >
> > Then it breaks!
>
> We want to avoid such a breakage. It is year 2023 out there, but
> there's still gobs of code that assumes dynamic binding.
Moreover, I still fail to understand why this is useful. Files
with no binding declaration have most probably been writen at
a time where dynamic binding was the only option [1]. So it does
make sense to treat them as if there were a "lexical-binding: f"
declaration in them. Everything else would be breaking the
interface contract. You better not do that (this would be the
same as changing the meaning of `+' for old programs: what
for?)
This means that the variable `lexical-binding' is always locally
bound, so its global binding is meaningless.
Cheers
--
t
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2023-01-30 12:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-28 3:01 Why is lexical-binding's global value ignored? abq
2023-01-28 7:10 ` tomas
2023-01-29 9:36 ` Jean Louis
2023-01-31 4:19 ` Richard Stallman
2023-01-31 13:49 ` Eli Zaretskii
2023-01-28 16:11 ` abq
2023-01-28 18:44 ` tomas
2023-01-28 22:34 ` abq
2023-01-29 6:54 ` Eli Zaretskii
2023-01-30 3:53 ` abq
2023-01-30 12:32 ` Eli Zaretskii
2023-01-30 12:59 ` tomas [this message]
2023-01-30 13:45 ` Po Lu
2023-02-01 2:04 ` abq
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y9e/SPB1K/n/r7D1@tuxteam.de \
--to=tomas@tuxteam.de \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.