From: Stefan Kangas <stefan@marxist.se>
To: Po Lu <luangruo@yahoo.com>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>,
Emacs developers <emacs-devel@gnu.org>
Subject: Re: Declaring 'lexical-binding: nil' obsolete
Date: Sat, 25 Sep 2021 17:50:52 -0700 [thread overview]
Message-ID: <CADwFkmnNgg-zeAWfA4wsJXOnn5mF_1SvjXe58W1jd55AANsw=A@mail.gmail.com> (raw)
In-Reply-To: <87h7e8w5vm.fsf@yahoo.com>
Po Lu <luangruo@yahoo.com> writes:
> Stefan Kangas <stefan@marxist.se> writes:
>
>> The roadmap I propose will give you a decade or so to adjust, and even
>> then will you only need to change one line per ELisp file for it to work
>> just as it does today.
>>
>> Before then, the worst that will happen is that you will see a warning.
>
> Yes, but is there any compelling reason other than "it's obsolete" to
> make this change?
Is there any compelling reason not to?
Of course we have plenty of compelling reasons, but the main one is that
we currently have two dialects of Emacs Lisp, where it would be better
and less confusing to have one.
> If it's to prevent new Emacs Lisp authors from inadvertently writing
> dynamically-bound code, I suggest to rewrite (eintr)Prevent confusion
> and other places in the documentation aimed at new users that seem to
> encourage them to write dynamically-bound code. I'm sure that a large
> part of the dynamically bound code present today stems from users not
> knowing better; instead of a blanket obsoletion, better and more
> immediate solutions can be found, such as updating the Introduction to
> Programming in Emacs Lisp to not refer users to dynamic binding.
I'm sure that we will review those parts of the documentation in due
time. But the "blanket" (not sure why you add this word) obsoletion is
precisely about discouraging the use of the 'lexical-binding:nil'
dialect of Emacs Lisp.
If you read my proposal carefully, I hope it is clear that this
obsoletion mostly just entails our strong recommendation. Support for
'lexical-binding:nil' will need to be there for the foreseeable future.
I do not include removing this feature in the plan I propose, and this
is not by accident.
> Perhaps a notice in Emacs Lisp mode when creating new dynamically bound
> files would also be prudent. (For instance: "This file is being
> dynamically bound. If you don't intend for it to be this way, please
> read (elisp)Lexical Binding")
(Note that we already have a warning in the mode-line.)
next prev parent reply other threads:[~2021-09-26 0:50 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-25 22:47 Declaring 'lexical-binding: nil' obsolete Stefan Kangas
2021-09-25 23:17 ` Po Lu
2021-09-26 0:04 ` Stefan Kangas
2021-09-26 0:13 ` Po Lu
2021-09-26 0:50 ` Stefan Kangas [this message]
2021-09-26 1:20 ` Po Lu
2021-09-26 2:37 ` Stefan Kangas
2021-09-26 2:55 ` Po Lu
2021-09-26 6:30 ` Eli Zaretskii
2021-09-26 6:08 ` Eli Zaretskii
2021-09-26 6:06 ` Eli Zaretskii
2021-09-25 23:56 ` Eduardo Ochs
2021-09-26 0:35 ` Stefan Kangas
2021-09-26 6:02 ` Eli Zaretskii
2021-09-26 6:36 ` Lars Ingebrigtsen
2021-09-27 22:35 ` Deprecating 'lexical-binding: nil' Richard Stallman
2021-09-27 23:09 ` Stefan Kangas
2021-09-28 1:42 ` Stefan Monnier
2021-09-30 6:03 ` Richard Stallman
2021-09-30 14:18 ` Steingold
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADwFkmnNgg-zeAWfA4wsJXOnn5mF_1SvjXe58W1jd55AANsw=A@mail.gmail.com' \
--to=stefan@marxist.se \
--cc=emacs-devel@gnu.org \
--cc=luangruo@yahoo.com \
--cc=monnier@iro.umontreal.ca \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).