[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp files.el
From: |
Alan Mackenzie |
Subject: |
[Emacs-diffs] emacs/lisp files.el |
Date: |
Sat, 18 Jul 2009 20:41:33 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Alan Mackenzie <acmacm> 09/07/18 20:41:33
Modified files:
lisp : files.el
Log message:
(hack-local-variables-filter): Remove entries with duplicate keys from
`file-local-variables-alist'.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/files.el?cvsroot=emacs&r1=1.1056&r2=1.1057
Patches:
Index: files.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/files.el,v
retrieving revision 1.1056
retrieving revision 1.1057
diff -u -b -r1.1056 -r1.1057
--- files.el 16 Jul 2009 01:52:36 -0000 1.1056
+++ files.el 18 Jul 2009 20:41:32 -0000 1.1057
@@ -2960,7 +2960,11 @@
(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 @@
(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 @@
(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)
- [Emacs-diffs] emacs/lisp files.el,
Alan Mackenzie <=