Function: w32-untranslated-canonical-name
w32-untranslated-canonical-name is a byte-compiled function defined in
dos-w32.el.gz.
Signature
(w32-untranslated-canonical-name FILENAME)
Documentation
Return FILENAME in a canonicalized form for use with the functions dealing with untranslated filesystems.
Source Code
;; Defined in /usr/src/emacs/lisp/dos-w32.el.gz
(defun w32-untranslated-canonical-name (filename)
"Return FILENAME in a canonicalized form for use with the functions
dealing with untranslated filesystems."
(if (memq system-type '(ms-dos windows-nt cygwin))
;; The canonical form for DOS/W32 is with A-Z downcased and all
;; directory separators changed to directory-sep-char.
(let ((name
(mapconcat (lambda (char)
(char-to-string (if (and (<= ?A char ?Z))
(+ (- char ?A) ?a)
char)))
filename nil)))
;; Use expand-file-name to canonicalize directory separators, except
;; with bare drive letters (which would have the cwd appended).
;; Avoid expanding names that could trigger ange-ftp to prompt
;; for passwords, though.
(if (or (string-match-p "^.:\\'" name)
(string-match-p "^/[^/:]+:" name))
name
(expand-file-name name)))
filename))