Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
066327ae
Commit
066327ae
authored
Dec 19, 1995
by
Karl Heuer
Browse files
(make-backup-file-name, backup-file-name-p): Use ~ even
on ms-dos.
parent
53588795
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
lisp/files.el
lisp/files.el
+6
-6
No files found.
lisp/files.el
View file @
066327ae
...
...
@@ -1596,18 +1596,18 @@ This is a separate function so you can redefine it for customization."
(
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,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment