diff 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
line wrap: on
line diff
--- a/lisp/files.el	Mon Jun 22 06:41:50 2009 +0000
+++ b/lisp/files.el	Mon Jun 22 07:02:04 2009 +0000
@@ -3213,7 +3213,9 @@
     (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)))))