[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/files.el
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/files.el |
Date: |
Wed, 28 Aug 2002 18:16:43 -0400 |
Index: emacs/lisp/files.el
diff -c emacs/lisp/files.el:1.603 emacs/lisp/files.el:1.604
*** emacs/lisp/files.el:1.603 Tue Aug 27 16:37:00 2002
--- emacs/lisp/files.el Wed Aug 28 18:16:42 2002
***************
*** 2574,2580 ****
(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)
(while alist
(setq elt (pop alist))
(if (string-match (car elt) file)
--- 2574,2580 ----
(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)
(while alist
(setq elt (pop alist))
(if (string-match (car elt) file)
***************
*** 2589,2617 ****
(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".
(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
"drive_"
(char-to-string (downcase (aref file 0)))
! (if (eq (aref file 2) directory-sep-char)
""
! 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)
--- 2589,2616 ----
(if (file-name-absolute-p backup-directory)
(progn
(when (memq system-type '(windows-nt ms-dos))
! ;; 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)))
(if (eq (aref file 1) ?:)
! (setq file (concat "/"
"drive_"
(char-to-string (downcase (aref file 0)))
! (if (eq (aref file 2) ?/)
""
! "/")
(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
! ?/ ?!
(replace-regexp-in-string "!" "!!" file))
backup-directory))
(expand-file-name (file-name-nondirectory file)
***************
*** 3563,3569 ****
(setq filename (concat
(file-name-directory result)
(subst-char-in-string
! directory-sep-char ?!
(replace-regexp-in-string "!" "!!"
filename))))
(setq filename result)))
--- 3562,3568 ----
(setq filename (concat
(file-name-directory result)
(subst-char-in-string
! ?/ ?!
(replace-regexp-in-string "!" "!!"
filename))))
(setq filename result)))