From: Glenn Morris Date: Mon, 22 Jun 2009 07:02:04 +0000 (+0000) Subject: (dir-locals-collect-mode-variables): Allow for any number of `mode' X-Git-Tag: emacs-pretest-23.1.90~2478 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=46253b344064c3cc340e6838bcb5f87d64a5260f;p=emacs.git (dir-locals-collect-mode-variables): Allow for any number of `mode' and `eval' entries. (Bug#3430) --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a39a5249aaa..8d50839ea80 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2009-06-22 Glenn Morris + * files.el (dir-locals-collect-mode-variables): Allow for any number of + `mode' and `eval' entries. (Bug#3430) + * Makefile.in (ELCFILES): Add fadr.elc. * calendar/appt.el (appt-make-list): Fix off-by-one error caused by diff --git a/lisp/files.el b/lisp/files.el index ff6b6927696..8718a9668c9 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3213,7 +3213,9 @@ Returns the new list." (let* ((variable (car pair)) (value (cdr pair)) (slot (assq variable variables))) - (if slot + ;; If variables are specified more than once, only use the last. (Why?) + ;; The pseudo-variables mode and eval are different (bug#3430). + (if (and slot (not (memq variable '(mode eval)))) (setcdr slot value) ;; Need a new cons in case we setcdr later. (push (cons variable value) variables)))))