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
4503dacb
Commit
4503dacb
authored
Dec 29, 1995
by
Richard M. Stallman
Browse files
(make-auto-save-file-name): Make name always end in #,
i.e. overwrite third char in extension if required.
parent
4a60f8c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
lisp/files.el
lisp/files.el
+10
-4
No files found.
lisp/files.el
View file @
4503dacb
...
...
@@ -2342,10 +2342,16 @@ Does not consider `auto-save-visited-file-name' as that variable is checked
before calling this function. You can redefine this for customization.
See also `auto-save-file-name-p'."
(
if
buffer-file-name
(
concat
(
file-name-directory
buffer-file-name
)
"#"
(
file-name-nondirectory
buffer-file-name
)
"#"
)
(
if
(
eq
system-type
'ms-dos
)
(
let
((
fn
(
file-name-nondirectory
buffer-file-name
)))
(
string-match
"\\`\\([^.]+\\)\\(\\.\\(..?\\)?.?\\|\\)\\'"
fn
)
(
concat
(
file-name-directory
buffer-file-name
)
"#"
(
match-string
1
fn
)
"."
(
match-string
3
fn
)
"#"
))
(
concat
(
file-name-directory
buffer-file-name
)
"#"
(
file-name-nondirectory
buffer-file-name
)
"#"
))
;; Deal with buffers that don't have any associated files. (Mail
;; mode tends to create a good number of these.)
...
...
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