summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2008-12-26 15:02:47 +0000
committerEli Zaretskii <eliz@gnu.org>2008-12-26 15:02:47 +0000
commit2e480e42fa59da5d948532b4ebd0e43ef0304bec (patch)
tree371d6208f633b916de6fe38ded2a60d24e2c300c /lisp
parent8245c361846d7b26b6e173ab1fb4848bd7803da4 (diff)
downloademacs-2e480e42fa59da5d948532b4ebd0e43ef0304bec.tar.gz
(dosified-file-name): New function.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/dos-fns.el19
2 files changed, 27 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0d00252edde..3a025d5bac9 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
+2008-12-26 Eli Zaretskii <eliz@gnu.org>
+
+ * dos-fns.el (dosified-file-name): New function.
+
+ * files.el (dir-locals-find-file): Run dir-locals-file through
+ dosified-file-name. Compare files case-insensitively on systems
+ whose filesystems are case-insensitive.
+
2008-12-25 Martin Rudalics <rudalics@gmx.at>
* help.el (help-for-help-internal): Fix entry for "l".
diff --git a/lisp/dos-fns.el b/lisp/dos-fns.el
index edcebb1306a..c6de5b2868a 100644
--- a/lisp/dos-fns.el
+++ b/lisp/dos-fns.el
@@ -186,6 +186,25 @@ shell requires it (see `w32-shell-dos-semantics')."
(dos-8+3-filename dir))
string))))))
+;; This is for the sake of standard file names elsewhere in Emacs that
+;; are defined as constant strings or via defconst, and whose
+;; conversion via `convert-standard-filename' does not give good
+;; enough results.
+(defun dosified-file-name (file-name)
+ "Return a variant of FILE-NAME that is valid on MS-DOS filesystems.
+
+This function is for those rare cases where `convert-standard-filename'
+does not do a job that is good enough, e.g. if you need to preserve the
+file-name extension. It recognizes only certain specific file names
+that are used in Emacs Lisp sources; any other file name will be
+returned unaltered."
+ (cond
+ ;; See files.el:dir-locals-file.
+ ((string= file-name ".dir-locals.el")
+ "_dir-locals.el")
+ (t
+ file-name)))
+
;; See dos-vars.el for defcustom.
(defvar msdos-shells)