unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Phil Sainty <psainty@orcon.net.nz>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 47843@debbugs.gnu.org
Subject: bug#47843: 28.0.50; Setting enable-local-variables to nil *appears* to inhibit lexical-binding (but doesn't)
Date: Tue, 4 May 2021 23:45:12 +1200	[thread overview]
Message-ID: <dd44cabe-6a77-4de5-bf54-1b8ebf37b913@orcon.net.nz> (raw)
In-Reply-To: <87v97y94t6.fsf@gnus.org>

On 4/05/21 10:22 pm, Lars Ingebrigtsen wrote:
> `C-M-x' on the two forms failed, as expected.  (When enabling the
> variable, they are successful.)
> 
> So I think everything works as expected here?  That is, the buffer
> doesn't use lexical mode if you set enable-local-variables to nil.
> 
> Are you seeing something different?

I see the same thing.  I also note that `eval-region' produces the
same result as `eval-defun'.  (I'd only tested `eval-buffer' initially,
and that respects the `lexical-binding' setting.)

My main point was that I'm dubious that enable-local-variables should
be allowed to affect lexical-binding in any situation.

While it's strictly true that the lexical-binding implementation
utilises a file-local variable, I feel like this particular variable
should be guaranteed to be respected when set, because it fundamentally
changes how the code will be interpreted.

Are there are any other file-local variables in that same category?
I couldn't think of any offhand, and so this seemed worthy of having
an exception made.


-Phil





  reply	other threads:[~2021-05-04 11:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-17 13:51 bug#47843: 28.0.50; Setting enable-local-variables to nil *appears* to inhibit lexical-binding (but doesn't) Phil Sainty
2021-05-04 10:22 ` Lars Ingebrigtsen
2021-05-04 11:45   ` Phil Sainty [this message]
2021-05-05  8:56     ` Lars Ingebrigtsen
2021-05-05 12:46       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-06  9:04         ` Lars Ingebrigtsen
2021-05-06 13:32           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-10 10:42             ` Lars Ingebrigtsen

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=dd44cabe-6a77-4de5-bf54-1b8ebf37b913@orcon.net.nz \
    --to=psainty@orcon.net.nz \
    --cc=47843@debbugs.gnu.org \
    --cc=larsi@gnus.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 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).