all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tom Gillespie <tgbugs@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: Re: [PATCH] hack-one-local-variable use lexical-binding
Date: Sat, 28 Nov 2020 23:12:14 -0500	[thread overview]
Message-ID: <CA+G3_PNA=SBW2n75ufiXY_hHQ3HKhY5Jwnz9feSoozmDkjnzuQ@mail.gmail.com> (raw)
In-Reply-To: <83blfkqisb.fsf@gnu.org>

> > > This would be a backward-incompatible change, wouldn't it?
> >
> > I've made exactly this kind of incompatible change many times over
> > between Emacs-24 and now.  I don't think we should worry about it.
> >
> > > I'd prefer a backward compatible solution.  For example, how about
> > > a separate lexical-eval clause, which will do this leaving eval to
> > > work as it did before?
> >
> > As I said, that's over-engineering.
>
> We disagree.

After reflecting on this I think that there is an important difference
between the local variables list and the other special evaluation
contexts which might make this not over-engineered. In the M-:, ielm,
and scratch cases, there isn't an existing file, this is particularly
relevant where it would be important to always have the same behavior
in the minibuffer regardless of file. However, there is a file in the
case of an eval local variable. For consistency this means that the
file should have control over whether lexical or dynamic bindings is
used. As noted in my original email, the current implementation would
also allow users to control the lexical binding of the local variables
independent of the rest of the file. While I personally have never
encountered a case where someone explicitly sets lexical-binding: nil,
I imagine that it would be surprising if elisp code in a file with
that set was irreversibly forced into lexical mode despite the fact
that the configuration option already must be present in the file.
Obviously this would not be the case for non-elisp files, but since
the prop line lexical-binding infrastructure is going to be around for
the foreseeable future I'm not sure what there is to lose by simply
passing lexical-binding instead of t. Best,
Tom



  reply	other threads:[~2020-11-29  4:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-26  2:55 [PATCH] hack-one-local-variable use lexical-binding Tom Gillespie
2020-11-26  3:07 ` Stefan Monnier
2020-11-26  4:47   ` Tom Gillespie
2020-11-26  7:16     ` Eli Zaretskii
2020-11-26 14:21       ` Stefan Monnier
2020-11-26 14:44         ` Eli Zaretskii
2020-11-29  4:12           ` Tom Gillespie [this message]
2020-11-29  9:43           ` Stefan Kangas
2020-11-29 15:42             ` Eli Zaretskii
2020-11-29 19:50               ` Tom Gillespie
2020-11-29 20:38                 ` Stefan Monnier

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='CA+G3_PNA=SBW2n75ufiXY_hHQ3HKhY5Jwnz9feSoozmDkjnzuQ@mail.gmail.com' \
    --to=tgbugs@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --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 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.