GNU bug report logs - #47843
28.0.50; Setting enable-local-variables to nil *appears* to inhibit lexical-binding (but doesn't)

Previous Next

Package: emacs;

Reported by: Phil Sainty <psainty <at> orcon.net.nz>

Date: Sat, 17 Apr 2021 13:53:02 UTC

Severity: normal

Tags: fixed

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #16 received at 47843 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Phil Sainty <psainty <at> orcon.net.nz>
Cc: 47843 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#47843: 28.0.50; Setting enable-local-variables to nil
 *appears* to inhibit lexical-binding (but doesn't)
Date: Wed, 05 May 2021 10:56:47 +0200
Phil Sainty <psainty <at> orcon.net.nz> writes:

> 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.)

Ah, right.  Hm...  well, I guess that's kinda logical?  But it's a bit
confusing; yes...

> 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.

Hm...  can't think of any other variables like this, either.

I don't really have an opinion here -- I can see arguments for both
sides.  Perhaps Stefan has an opinion here (added to the CCs).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 4 years and 13 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.