mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-27 07:37:33 +00:00
(make-backup-file-name, backup-file-name-p): Use ~ even
on ms-dos.
This commit is contained in:
parent
53588795b1
commit
066327aee3
@ -1596,18 +1596,18 @@ This is a separate function so you can redefine it for customization."
|
|||||||
(if (eq system-type 'ms-dos)
|
(if (eq system-type 'ms-dos)
|
||||||
(let ((fn (file-name-nondirectory file)))
|
(let ((fn (file-name-nondirectory file)))
|
||||||
(concat (file-name-directory file)
|
(concat (file-name-directory file)
|
||||||
(if (string-match "\\([^.]*\\)\\(\\..*\\)?" fn)
|
(or
|
||||||
(substring fn 0 (match-end 1)))
|
(and (string-match "\\`[^.]+\\'" fn)
|
||||||
".bak"))
|
(concat (match-string 0 fn) ".~"))
|
||||||
|
(and (string-match "\\`[^.]+\\.\\(..?\\)?" fn)
|
||||||
|
(concat (match-string 0 fn) "~")))))
|
||||||
(concat file "~")))
|
(concat file "~")))
|
||||||
|
|
||||||
(defun backup-file-name-p (file)
|
(defun backup-file-name-p (file)
|
||||||
"Return non-nil if FILE is a backup file name (numeric or not).
|
"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.
|
This is a separate function so you can redefine it for customization.
|
||||||
You may need to redefine `file-name-sans-versions' as well."
|
You may need to redefine `file-name-sans-versions' as well."
|
||||||
(if (eq system-type 'ms-dos)
|
(string-match "~\\'" file))
|
||||||
(string-match "\\.bak$" file)
|
|
||||||
(string-match "~$" file)))
|
|
||||||
|
|
||||||
;; This is used in various files.
|
;; This is used in various files.
|
||||||
;; The usage of bv-length is not very clean,
|
;; The usage of bv-length is not very clean,
|
||||||
|
Loading…
Reference in New Issue
Block a user