diff options
author | Eli Zaretskii <eliz@gnu.org> | 2010-05-15 11:31:40 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2010-05-15 11:31:40 +0300 |
commit | 98d8b17e45bb1246df61e51f8917b98faa9f1cdd (patch) | |
tree | 392c21e9c3856e786d0fef88b7baa77f6080a23d /lisp/files.el | |
parent | 78248b76e396d96a7c7c25ae91296e31fee558da (diff) | |
download | emacs-98d8b17e45bb1246df61e51f8917b98faa9f1cdd.tar.gz |
Don't override standard definition of convert-standard-filename.
Add obsolete aliases for dos-fns.el functions.
files.el (convert-standard-filename): Call
w32-convert-standard-filename and dos-convert-standard-filename on
the corresponding systems.
w32-fns.el (w32-convert-standard-filename): Rename from
convert-standard-filename. Doc fix.
dos-fns.el (dos-convert-standard-filename): Doc fix.
(convert-standard-filename): Don't defalias.
(register-name-alist, make-register, register-value)
(set-register-value, intdos): Obsolete aliases for the
corresponding dos-* functions and variables.
(dos-intdos): Add a doc string.
Diffstat (limited to 'lisp/files.el')
-rw-r--r-- | lisp/files.el | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/lisp/files.el b/lisp/files.el index 83ae91dd63a..d4c05bdc5d6 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -574,6 +574,9 @@ Runs the usual ange-ftp hook, but only for completion operations." (inhibit-file-name-operation op)) (apply op args)))) +(declare-function dos-convert-standard-filename "dos-fns.el" (filename)) +(declare-function w32-convert-standard-filename "w32-fns.el" (filename)) + (defun convert-standard-filename (filename) "Convert a standard file's name to something suitable for the OS. This means to guarantee valid names and perhaps to canonicalize @@ -591,15 +594,20 @@ and also turn slashes into backslashes if the shell requires it (see `w32-shell-dos-semantics'). See Info node `(elisp)Standard File Names' for more details." - (if (eq system-type 'cygwin) - (let ((name (copy-sequence filename)) - (start 0)) - ;; Replace invalid filename characters with ! - (while (string-match "[?*:<>|\"\000-\037]" name start) - (aset name (match-beginning 0) ?!) - (setq start (match-end 0))) - name) - filename)) + (cond + ((eq system-type 'cygwin) + (let ((name (copy-sequence filename)) + (start 0)) + ;; Replace invalid filename characters with ! + (while (string-match "[?*:<>|\"\000-\037]" name start) + (aset name (match-beginning 0) ?!) + (setq start (match-end 0))) + name)) + ((eq system-type 'windows-nt) + (w32-convert-standard-filename filename)) + ((eq system-type 'ms-dos) + (dos-convert-standard-filename filename)) + (t filename))) (defun read-directory-name (prompt &optional dir default-dirname mustmatch initial) "Read directory name, prompting with PROMPT and completing in directory DIR. |