diff options
| author | Juri Linkov | 2009-12-17 01:18:14 +0000 |
|---|---|---|
| committer | Juri Linkov | 2009-12-17 01:18:14 +0000 |
| commit | cfb54897c9ba6e11352e89d1767c992b7841d035 (patch) | |
| tree | ef4d3e10aa413d1960142594a6e9a01f280f5863 | |
| parent | ad974e9e13ab6f9ece2c7558cef99e743e07743f (diff) | |
| download | emacs-cfb54897c9ba6e11352e89d1767c992b7841d035.tar.gz 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 @@ | |||
| 1 | 2009-12-17 Juri Linkov <juri@jurta.org> | 1 | 2009-12-17 Juri Linkov <juri@jurta.org> |
| 2 | 2 | ||
| 3 | Fix regression from 23.1 to allow multiple modes in Local Variables. | ||
| 4 | |||
| 5 | * files.el (hack-local-variables-filter): While ignoring duplicates, | ||
| 6 | don't take `mode' into account. | ||
| 7 | (hack-local-variables-filter, hack-dir-local-variables): Don't | ||
| 8 | remove duplicate `mode' from local-variables-alist (like `eval'). | ||
| 9 | |||
| 10 | 2009-12-17 Juri Linkov <juri@jurta.org> | ||
| 11 | |||
| 3 | Make `dired-diff' more safe. (Bug#5225) | 12 | Make `dired-diff' more safe. (Bug#5225) |
| 4 | 13 | ||
| 5 | * dired-aux.el (dired-diff): Signal an error when `file' equals to | 14 | * 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 | |||
| 2978 | (or (eq enable-local-eval t) | 2978 | (or (eq enable-local-eval t) |
| 2979 | (hack-one-local-variable-eval-safep (eval (quote val))) | 2979 | (hack-one-local-variable-eval-safep (eval (quote val))) |
| 2980 | (push elt unsafe-vars)))) | 2980 | (push elt unsafe-vars)))) |
| 2981 | ;; Ignore duplicates in the present list. | 2981 | ;; Ignore duplicates (except `mode') in the present list. |
| 2982 | ((assq var all-vars) nil) | 2982 | ((and (assq var all-vars) (not (eq var 'mode))) nil) |
| 2983 | ;; Accept known-safe variables. | 2983 | ;; Accept known-safe variables. |
| 2984 | ((or (memq var '(mode unibyte coding)) | 2984 | ((or (memq var '(mode unibyte coding)) |
| 2985 | (safe-local-variable-p var val)) | 2985 | (safe-local-variable-p var val)) |
| @@ -2999,7 +2999,7 @@ DIR-NAME is a directory name if these settings come from | |||
| 2999 | (hack-local-variables-confirm all-vars unsafe-vars | 2999 | (hack-local-variables-confirm all-vars unsafe-vars |
| 3000 | risky-vars dir-name)) | 3000 | risky-vars dir-name)) |
| 3001 | (dolist (elt all-vars) | 3001 | (dolist (elt all-vars) |
| 3002 | (unless (eq (car elt) 'eval) | 3002 | (unless (memq (car elt) '(eval mode)) |
| 3003 | (unless dir-name | 3003 | (unless dir-name |
| 3004 | (setq dir-local-variables-alist | 3004 | (setq dir-local-variables-alist |
| 3005 | (assq-delete-all (car elt) dir-local-variables-alist))) | 3005 | (assq-delete-all (car elt) dir-local-variables-alist))) |
| @@ -3427,7 +3427,7 @@ and `file-local-variables-alist', without applying them." | |||
| 3427 | (dir-locals-get-class-variables class) dir-name nil))) | 3427 | (dir-locals-get-class-variables class) dir-name nil))) |
| 3428 | (when variables | 3428 | (when variables |
| 3429 | (dolist (elt variables) | 3429 | (dolist (elt variables) |
| 3430 | (unless (eq (car elt) 'eval) | 3430 | (unless (memq (car elt) '(eval mode)) |
| 3431 | (setq dir-local-variables-alist | 3431 | (setq dir-local-variables-alist |
| 3432 | (assq-delete-all (car elt) dir-local-variables-alist))) | 3432 | (assq-delete-all (car elt) dir-local-variables-alist))) |
| 3433 | (push elt dir-local-variables-alist)) | 3433 | (push elt dir-local-variables-alist)) |