]> git.eshelyaron.com Git - emacs.git/commitdiff
(dir-locals-collect-mode-variables): Allow for any number of `mode'
authorGlenn Morris <rgm@gnu.org>
Mon, 22 Jun 2009 07:02:04 +0000 (07:02 +0000)
committerGlenn Morris <rgm@gnu.org>
Mon, 22 Jun 2009 07:02:04 +0000 (07:02 +0000)
and `eval' entries.  (Bug#3430)

lisp/ChangeLog
lisp/files.el

index a39a5249aaaf79b33e47ed20bff5443ab81fed79..8d50839ea80f6fcfadffad05c3959eb824a3f5f4 100644 (file)
@@ -1,5 +1,8 @@
 2009-06-22  Glenn Morris  <rgm@gnu.org>
 
+       * 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
index ff6b69276965f24a731236226d1403ff6b2335fe..8718a9668c9e7a20f99cc1ed64ef4c429fcce709 100644 (file)
@@ -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)))))