From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, Andrea Corallo <acorallo@gnu.org>,
74145@debbugs.gnu.org
Subject: bug#74145: 31.0.50; Default lexical-binding to t
Date: Thu, 31 Oct 2024 21:20:41 -0400 [thread overview]
Message-ID: <jwvbjyzhi0l.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CADwFkmnT5OO2cbtgTg_W+KWPUrH9MTF+mOoRQOPJU5LDEJXarA@mail.gmail.com> (Stefan Kangas's message of "Thu, 31 Oct 2024 16:31:49 -0700")
Hi Stefan,
>> @@ -392,7 +392,7 @@ Void Variables
>> to evaluate the variable signals a @code{void-variable} error, instead
>> of returning a value.
>>
>> - Under the optional lexical scoping rule, the value cell only holds
>> + Under the optional lexical scoping rule, the value cell holds only
>> the variable's global value---the value outside of any lexical binding
>> construct. When a variable is lexically bound, the local value is
>> determined by the lexical environment; hence, variables can have local
>
> I think this section might need more work. It's a bit confusing to talk
> about "default dynamic scoping" and "optional lexical scoping" now.
> Shouldn't we talk about "normal variables with lexical scoping" and
> "special variables with dynamic scoping" or something along those lines?
Very good point, will take a closer look.
>> + (lexical-binding (default-toplevel-value 'lexical-binding)))
> Why not just use `t` here instead of its `default-toplevel-value`?
I "fixed" the code such that the default is set at exactly one place,
i.e. in `syms_of_lread`, but indeed it's not indispensable.
It's not super important, but it seemed cleaner.
It also makes it easy for users to "go back" to the nil default,
e.g. for testing purposes, or as a quick fix until you can track down
the `.el` files that need to be adjusted.
Stefan
next prev parent reply other threads:[~2024-11-01 1:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-31 20:57 bug#74145: 31.0.50; Default lexical-binding to t Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-31 23:31 ` Stefan Kangas
2024-11-01 1:20 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-11-01 2:05 ` Stefan Kangas
2024-11-01 3:07 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
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=jwvbjyzhi0l.fsf-monnier+emacs@gnu.org \
--to=bug-gnu-emacs@gnu.org \
--cc=74145@debbugs.gnu.org \
--cc=acorallo@gnu.org \
--cc=eliz@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=stefankangas@gmail.com \
/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.