aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/files.el
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>2002-08-28 22:16:42 +0000
committerRichard M. Stallman <[email protected]>2002-08-28 22:16:42 +0000
commitd7b6ca4a9f4432a94d9000c35f32144874faf4ea (patch)
tree28a29371148ec06880587312a6d434914b27ddbb /lisp/files.el
parent2fb79329b5c58041da276ace62b9475fe3c78317 (diff)
(make-auto-save-file-name, make-backup-file-name-1):
Don't use directory-sep-char.
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el19
1 files changed, 9 insertions, 10 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 2d129c888e..0cb3fddece 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2574,7 +2574,7 @@ doesn't exist, it is created."
(defun make-backup-file-name-1 (file)
"Subroutine of `make-backup-file-name' and `find-backup-file-name'."
(let ((alist backup-directory-alist)
- elt backup-directory dir-sep-string)
+ elt backup-directory)
(while alist
(setq elt (pop alist))
(if (string-match (car elt) file)
@@ -2589,29 +2589,28 @@ doesn't exist, it is created."
(if (file-name-absolute-p backup-directory)
(progn
(when (memq system-type '(windows-nt ms-dos))
- ;; Normalize DOSish file names: convert all slashes to
- ;; directory-sep-char, downcase the drive letter, if any,
- ;; and replace the leading "x:" with "/drive_x".
+ ;; Normalize DOSish file names: downcase the drive
+ ;; letter, if any, and replace the leading "x:" with
+ ;; "/drive_x".
(or (file-name-absolute-p file)
(setq file (expand-file-name file))) ; make defaults explicit
;; Replace any invalid file-name characters (for the
;; case of backing up remote files).
(setq file (expand-file-name (convert-standard-filename file)))
- (setq dir-sep-string (char-to-string directory-sep-char))
(if (eq (aref file 1) ?:)
- (setq file (concat dir-sep-string
+ (setq file (concat "/"
"drive_"
(char-to-string (downcase (aref file 0)))
- (if (eq (aref file 2) directory-sep-char)
+ (if (eq (aref file 2) ?/)
""
- dir-sep-string)
+ "/")
(substring file 2)))))
;; Make the name unique by substituting directory
;; separators. It may not really be worth bothering about
;; doubling `!'s in the original name...
(expand-file-name
(subst-char-in-string
- directory-sep-char ?!
+ ?/ ?!
(replace-regexp-in-string "!" "!!" file))
backup-directory))
(expand-file-name (file-name-nondirectory file)
@@ -3563,7 +3562,7 @@ See also `auto-save-file-name-p'."
(setq filename (concat
(file-name-directory result)
(subst-char-in-string
- directory-sep-char ?!
+ ?/ ?!
(replace-regexp-in-string "!" "!!"
filename))))
(setq filename result)))