unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Phil Sainty <psainty@orcon.net.nz>
To: 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: Sun, 18 Apr 2021 01:51:51 +1200	[thread overview]
Message-ID: <e69baad1-7a4c-a103-c8df-fad88bfdbfce@orcon.net.nz> (raw)

With enable-local-variables set to nil, when editing an elisp buffer
using lexical-binding it can *seem* as though lexical-binding is not
enabled, as -*- lexical-binding: t -*- is being inhibited along with
any others.

Experimentally, Emacs appears to do the right thing, still evaluating
the code using lexical-binding.  I tested loading compiled and
uncompiled code, as well as `eval-buffer', and all of those seemed
to work correctly.

So, as far as I can, see the *only* issue is that inspecting the
local variable suggests differently.  This includes Emacs 28
displaying "elisp/d" (for dynamic binding) in the mode line instead
of "elisp/l".

Should an exception be made for this specific case, so that the
file-local variable is processed even if enable-local-variables
is nil?






             reply	other threads:[~2021-04-17 13:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-17 13:51 Phil Sainty [this message]
2021-05-04 10:22 ` bug#47843: 28.0.50; Setting enable-local-variables to nil *appears* to inhibit lexical-binding (but doesn't) Lars Ingebrigtsen
2021-05-04 11:45   ` Phil Sainty
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=e69baad1-7a4c-a103-c8df-fad88bfdbfce@orcon.net.nz \
    --to=psainty@orcon.net.nz \
    --cc=47843@debbugs.gnu.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).