diff options
author | Juri Linkov <juri@jurta.org> | 2009-12-17 01:18:14 +0000 |
---|---|---|
committer | Juri Linkov <juri@jurta.org> | 2009-12-17 01:18:14 +0000 |
commit | cfb54897c9ba6e11352e89d1767c992b7841d035 (patch) | |
tree | ef4d3e10aa413d1960142594a6e9a01f280f5863 | |
parent | ad974e9e13ab6f9ece2c7558cef99e743e07743f (diff) | |
download | emacs-cfb54897c9ba6e11352e89d1767c992b7841d035.tar.gz emacs-cfb54897c9ba6e11352e89d1767c992b7841d035.tar.bz2 emacs-cfb54897c9ba6e11352e89d1767c992b7841d035.zip |
Fix regression from 23.1 to allow multiple modes in Local Variables.
* files.el (hack-local-variables-filter): While ignoring duplicates,
don't take `mode' into account.
(hack-local-variables-filter, hack-dir-local-variables): Don't
remove duplicate `mode' from local-variables-alist (like `eval').
-rw-r--r-- | lisp/ChangeLog | 9 | ||||
-rw-r--r-- | lisp/files.el | 8 |
2 files changed, 13 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c2a166435d0..05bad0f012b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,14 @@ 2009-12-17 Juri Linkov <juri@jurta.org> + Fix regression from 23.1 to allow multiple modes in Local Variables. + + * files.el (hack-local-variables-filter): While ignoring duplicates, + don't take `mode' into account. + (hack-local-variables-filter, hack-dir-local-variables): Don't + remove duplicate `mode' from local-variables-alist (like `eval'). + +2009-12-17 Juri Linkov <juri@jurta.org> + Make `dired-diff' more safe. (Bug#5225) * dired-aux.el (dired-diff): Signal an error when `file' equals to diff --git a/lisp/files.el b/lisp/files.el index 8478151cf78..b848407b3ae 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2978,8 +2978,8 @@ DIR-NAME is a directory name if these settings come from (or (eq enable-local-eval t) (hack-one-local-variable-eval-safep (eval (quote val))) (push elt unsafe-vars)))) - ;; Ignore duplicates in the present list. - ((assq var all-vars) nil) + ;; Ignore duplicates (except `mode') in the present list. + ((and (assq var all-vars) (not (eq var 'mode))) nil) ;; Accept known-safe variables. ((or (memq var '(mode unibyte coding)) (safe-local-variable-p var val)) @@ -2999,7 +2999,7 @@ DIR-NAME is a directory name if these settings come from (hack-local-variables-confirm all-vars unsafe-vars risky-vars dir-name)) (dolist (elt all-vars) - (unless (eq (car elt) 'eval) + (unless (memq (car elt) '(eval mode)) (unless dir-name (setq dir-local-variables-alist (assq-delete-all (car elt) dir-local-variables-alist))) @@ -3427,7 +3427,7 @@ and `file-local-variables-alist', without applying them." (dir-locals-get-class-variables class) dir-name nil))) (when variables (dolist (elt variables) - (unless (eq (car elt) 'eval) + (unless (memq (car elt) '(eval mode)) (setq dir-local-variables-alist (assq-delete-all (car elt) dir-local-variables-alist))) (push elt dir-local-variables-alist)) |