changeset 100690:bc724faa95e6

(dir-locals-find-file) [ms-dos]: Run dir-locals-file through dosified-file-name. Compare files case-insensitively on systems whose filesystems are case-insensitive.
author Eli Zaretskii <eliz@gnu.org>
date Fri, 26 Dec 2008 15:01:10 +0000
parents eca026eee0d7
children 89166beb2187
files lisp/files.el
diffstat 1 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Fri Dec 26 14:43:21 2008 +0000
+++ b/lisp/files.el	Fri Dec 26 15:01:10 2008 +0000
@@ -3275,14 +3275,20 @@
 `dir-locals-directory-alist' is returned.
 Otherwise this returns nil."
   (setq file (expand-file-name file))
-  (let ((locals-file (locate-dominating-file file dir-locals-file))
-	(dir-elt nil))
+  (let* ((dir-locals-file-name
+	  (if (eq system-type 'ms-dos)
+	      (dosified-file-name dir-locals-file)
+	    dir-locals-file))
+	 (locals-file (locate-dominating-file file dir-locals-file-name))
+	 (dir-elt nil))
     ;; `locate-dominating-file' may have abbreviated the name.
     (when locals-file
-      (setq locals-file (expand-file-name dir-locals-file locals-file)))
+      (setq locals-file (expand-file-name dir-locals-file-name locals-file)))
     (dolist (elt dir-locals-directory-alist)
       (when (and (eq t (compare-strings file nil (length (car elt))
-					(car elt) nil nil))
+					(car elt) nil nil
+					(memq system-type
+					      '(windows-nt cygwin ms-dos))))
 		 (> (length (car elt)) (length (car dir-elt))))
 	(setq dir-elt elt)))
     (if (and locals-file dir-elt)