From: Tom Gillespie <tgbugs@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] hack-one-local-variable use lexical-binding
Date: Wed, 25 Nov 2020 23:47:44 -0500 [thread overview]
Message-ID: <CA+G3_PPS947dV3i-su2RTNxzKpZv5Zqt8QaeAiEJf+tHHmwp_A@mail.gmail.com> (raw)
In-Reply-To: <jwvo8jkbyv7.fsf-monnier+emacs@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 190 bytes --]
> I think we should just always pass `t` to `eval` there, yes.
> The other option is over-engineered.
Agreed. Here is the updated patch. I'm guessing this will need a NEWS item?
Best,
Tom
[-- Attachment #2: 0001-hack-one-local-variable-eval-with-LEXICAL-t.patch --]
[-- Type: text/x-patch, Size: 884 bytes --]
From d1b261faaed22f92a2c61ce43236a77221b6ce74 Mon Sep 17 00:00:00 2001
From: Tom Gillespie <tgbugs@gmail.com>
Date: Wed, 25 Nov 2020 23:37:36 -0500
Subject: [PATCH] hack-one-local-variable eval with LEXICAL t
* lisp/files.el (hack-one-local-variable): call eval with LEXICAL t
Change the behavior of eval: local variables to use lexical binding.
---
lisp/files.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/files.el b/lisp/files.el
index 49c9e5d18d..f6c1c44718 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3984,7 +3984,7 @@ hack-one-local-variable
('eval
(pcase val
(`(add-hook ',hook . ,_) (hack-one-local-variable--obsolete hook)))
- (save-excursion (eval val)))
+ (save-excursion (eval val t)))
(_
(hack-one-local-variable--obsolete var)
;; Make sure the string has no text properties.
--
2.26.2
next prev parent reply other threads:[~2020-11-26 4:47 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 [this message]
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
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
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=CA+G3_PPS947dV3i-su2RTNxzKpZv5Zqt8QaeAiEJf+tHHmwp_A@mail.gmail.com \
--to=tgbugs@gmail.com \
--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 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).