* bug#56957: [PATCH] Fix ignored-local-variable-values for non-primitive values
@ 2022-08-03 18:09 Kira Bruneau via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-03 18:17 ` Kira Bruneau via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 3+ messages in thread
From: Kira Bruneau via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-03 18:09 UTC (permalink / raw)
To: 56957
[-- Attachment #1: Type: text/plain, Size: 154 bytes --]
I noticed that structural comparison wasn't being done to ignore values in `ignored-local-variable-values', so it could only ever ignore primitive values.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-ignored-local-variable-values-for-non-primitive-.patch --]
[-- Type: text/x-patch; name=0001-Fix-ignored-local-variable-values-for-non-primitive-.patch, Size: 1283 bytes --]
From 6ae9a9ee9a177da9fbbc3e31faf0202fb846aebb Mon Sep 17 00:00:00 2001
From: Kira Bruneau <kira.bruneau@gmail.com>
Date: Wed, 3 Aug 2022 13:47:47 -0400
Subject: [PATCH] Fix ignored-local-variable-values for non-primitive values
This was previously using seq-some + eq to compare against ignored
values, but now we use member to structurally compare values like we
do for `safe-local-variable-values'.
* lisp/files.el (hack-local-variables-filter): Fix
`ignored-local-variable-values' for non-primitive values.
---
lisp/files.el | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/lisp/files.el b/lisp/files.el
index 5df1966193..215e7db7d8 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3848,10 +3848,7 @@ DIR-NAME is the name of the associated directory. Otherwise it is nil."
(cond ((memq var ignored-local-variables)
;; Ignore any variable in `ignored-local-variables'.
nil)
- ((seq-some (lambda (elem)
- (and (eq (car elem) var)
- (eq (cdr elem) val)))
- ignored-local-variable-values)
+ ((member elt ignored-local-variable-values)
nil)
;; Obey `enable-local-eval'.
((eq var 'eval)
--
2.37.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#56957: [PATCH] Fix ignored-local-variable-values for non-primitive values
2022-08-03 18:09 bug#56957: [PATCH] Fix ignored-local-variable-values for non-primitive values Kira Bruneau via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-08-03 18:17 ` Kira Bruneau via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-04 6:26 ` Lars Ingebrigtsen
0 siblings, 1 reply; 3+ messages in thread
From: Kira Bruneau via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-03 18:17 UTC (permalink / raw)
To: 56957
[-- Attachment #1: Type: text/plain, Size: 404 bytes --]
Oh sorry, I just noticed I had my old email configured for my local git repo. Here's a patch with my updated email.
------- Original Message -------
On Wednesday, August 3rd, 2022 at 2:09 PM, Kira Bruneau <kira.bruneau@pm.me> wrote:
>
>
> I noticed that structural comparison wasn't being done to ignore values in `ignored-local-variable-values', so it could only ever ignore primitive values.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-ignored-local-variable-values-for-non-primitive-.patch --]
[-- Type: text/x-patch; name=0001-Fix-ignored-local-variable-values-for-non-primitive-.patch, Size: 1283 bytes --]
From 6ae9a9ee9a177da9fbbc3e31faf0202fb846aebb Mon Sep 17 00:00:00 2001
From: Kira Bruneau <kira.bruneau@gmail.com>
Date: Wed, 3 Aug 2022 13:47:47 -0400
Subject: [PATCH] Fix ignored-local-variable-values for non-primitive values
This was previously using seq-some + eq to compare against ignored
values, but now we use member to structurally compare values like we
do for `safe-local-variable-values'.
* lisp/files.el (hack-local-variables-filter): Fix
`ignored-local-variable-values' for non-primitive values.
---
lisp/files.el | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/lisp/files.el b/lisp/files.el
index 5df1966193..215e7db7d8 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3848,10 +3848,7 @@ DIR-NAME is the name of the associated directory. Otherwise it is nil."
(cond ((memq var ignored-local-variables)
;; Ignore any variable in `ignored-local-variables'.
nil)
- ((seq-some (lambda (elem)
- (and (eq (car elem) var)
- (eq (cdr elem) val)))
- ignored-local-variable-values)
+ ((member elt ignored-local-variable-values)
nil)
;; Obey `enable-local-eval'.
((eq var 'eval)
--
2.37.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#56957: [PATCH] Fix ignored-local-variable-values for non-primitive values
2022-08-03 18:17 ` Kira Bruneau via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-08-04 6:26 ` Lars Ingebrigtsen
0 siblings, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2022-08-04 6:26 UTC (permalink / raw)
To: Kira Bruneau; +Cc: 56957
Kira Bruneau <kira.bruneau@pm.me> writes:
> Oh sorry, I just noticed I had my old email configured for my local
> git repo. Here's a patch with my updated email.
Thanks; pushed to Emacs 29.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-04 6:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-03 18:09 bug#56957: [PATCH] Fix ignored-local-variable-values for non-primitive values Kira Bruneau via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-03 18:17 ` Kira Bruneau via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-04 6:26 ` Lars Ingebrigtsen
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).