Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
982cbcab
Commit
982cbcab
authored
Jul 18, 2009
by
Alan Mackenzie
Browse files
(hack-local-variables-filter): Remove entries with duplicate keys from
`file-local-variables-alist'.
parent
10d37df7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
lisp/files.el
lisp/files.el
+12
-2
No files found.
lisp/files.el
View file @
982cbcab
...
...
@@ -2960,7 +2960,11 @@ DIR-NAME is a directory name if these settings come from
(
dolist
(
elt
variables
)
(
unless
(
or
(
member
elt
unsafe-vars
)
(
member
elt
risky-vars
))
(
push
elt
file-local-variables-alist
)))
(
let
((
var
(
car
elt
)))
(
unless
(
eq
var
'eval
)
(
setq
file-local-variables-alist
(
assq-delete-all
var
file-local-variables-alist
)))
(
push
elt
file-local-variables-alist
))))
;; Query, unless all are known safe or the user wants no
;; querying.
(
if
(
or
(
and
(
eq
enable-local-variables
t
)
...
...
@@ -2970,7 +2974,12 @@ DIR-NAME is a directory name if these settings come from
(
hack-local-variables-confirm
variables
unsafe-vars
risky-vars
dir-name
))
(
dolist
(
elt
variables
)
(
push
elt
file-local-variables-alist
)))))))
(
let
((
var
(
car
elt
)))
(
unless
(
eq
var
'eval
)
(
setq
file-local-variables-alist
(
assq-delete-all
var
file-local-variables-alist
)))
(
push
elt
file-local-variables-alist
))))))))
(
defun
hack-local-variables
(
&optional
mode-only
)
"Parse and put into effect this buffer's local variables spec.
...
...
@@ -3073,6 +3082,7 @@ is specified, returning t if it is specified."
(
enable-local-variables
(
hack-local-variables-filter
result
nil
)
(
when
file-local-variables-alist
;; Any 'evals must run in the Right sequence.
(
setq
file-local-variables-alist
(
nreverse
file-local-variables-alist
))
(
run-hooks
'before-hack-local-variables-hook
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment