Mercurial > emacs
comparison lisp/files.el @ 103519:86efef758d8c
(dir-locals-collect-mode-variables): Allow for any number of `mode'
and `eval' entries. (Bug#3430)
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Mon, 22 Jun 2009 07:02:04 +0000 |
parents | c05be0f4e7a4 |
children | 9f150a229376 |
comparison
equal
deleted
inserted
replaced
103518:b3548b2342dc | 103519:86efef758d8c |
---|---|
3211 Returns the new list." | 3211 Returns the new list." |
3212 (dolist (pair mode-variables variables) | 3212 (dolist (pair mode-variables variables) |
3213 (let* ((variable (car pair)) | 3213 (let* ((variable (car pair)) |
3214 (value (cdr pair)) | 3214 (value (cdr pair)) |
3215 (slot (assq variable variables))) | 3215 (slot (assq variable variables))) |
3216 (if slot | 3216 ;; If variables are specified more than once, only use the last. (Why?) |
3217 ;; The pseudo-variables mode and eval are different (bug#3430). | |
3218 (if (and slot (not (memq variable '(mode eval)))) | |
3217 (setcdr slot value) | 3219 (setcdr slot value) |
3218 ;; Need a new cons in case we setcdr later. | 3220 ;; Need a new cons in case we setcdr later. |
3219 (push (cons variable value) variables))))) | 3221 (push (cons variable value) variables))))) |
3220 | 3222 |
3221 (defun dir-locals-collect-variables (class-variables root variables) | 3223 (defun dir-locals-collect-variables (class-variables root variables) |