# HG changeset patch # User Karl Heuer # Date 819408613 0 # Node ID 2015901ab992bb973a5fa9f3d59e72eaeae9bb13 # Parent d86c1aa4355956f04ff9f1015762a789c09b418d (make-backup-file-name, backup-file-name-p): Use ~ even on ms-dos. diff -r d86c1aa43559 -r 2015901ab992 lisp/files.el --- a/lisp/files.el Tue Dec 19 21:10:33 1995 +0000 +++ b/lisp/files.el Tue Dec 19 21:30:13 1995 +0000 @@ -1596,18 +1596,18 @@ (if (eq system-type 'ms-dos) (let ((fn (file-name-nondirectory file))) (concat (file-name-directory file) - (if (string-match "\\([^.]*\\)\\(\\..*\\)?" fn) - (substring fn 0 (match-end 1))) - ".bak")) + (or + (and (string-match "\\`[^.]+\\'" fn) + (concat (match-string 0 fn) ".~")) + (and (string-match "\\`[^.]+\\.\\(..?\\)?" fn) + (concat (match-string 0 fn) "~"))))) (concat file "~"))) (defun backup-file-name-p (file) "Return non-nil if FILE is a backup file name (numeric or not). This is a separate function so you can redefine it for customization. You may need to redefine `file-name-sans-versions' as well." - (if (eq system-type 'ms-dos) - (string-match "\\.bak$" file) - (string-match "~$" file))) + (string-match "~\\'" file)) ;; This is used in various files. ;; The usage of bv-length is not very clean,