Mercurial > emacs
changeset 106605:b38517de715f
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').
author | Juri Linkov <juri@jurta.org> |
---|---|
date | Thu, 17 Dec 2009 01:18:14 +0000 |
parents | a1ae5e2d1200 |
children | 127ccb50f94e |
files | lisp/ChangeLog lisp/files.el |
diffstat | 2 files changed, 13 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Thu Dec 17 01:16:15 2009 +0000 +++ b/lisp/ChangeLog Thu Dec 17 01:18:14 2009 +0000 @@ -1,3 +1,12 @@ +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)
--- a/lisp/files.el Thu Dec 17 01:16:15 2009 +0000 +++ b/lisp/files.el Thu Dec 17 01:18:14 2009 +0000 @@ -2978,8 +2978,8 @@ (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 @@ (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 @@ (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))