changeset 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 b3548b2342dc
children e23e74725563
files lisp/ChangeLog lisp/files.el
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Mon Jun 22 06:41:50 2009 +0000
+++ b/lisp/ChangeLog	Mon Jun 22 07:02:04 2009 +0000
@@ -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
--- 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)))))