1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00

(set-visited-file-name): Change the auto save file name.

This commit is contained in:
Richard M. Stallman 1992-10-23 11:06:14 +00:00
parent 45ca32a63d
commit 6861ad22b2

View File

@ -926,7 +926,14 @@ if you wish to pass an empty string as the argument."
(setq backup-inhibited t)))
;; If auto-save was not already on, turn it on if appropriate.
(if (not buffer-auto-save-file-name)
(auto-save-mode (and buffer-file-name auto-save-default)))
(auto-save-mode (and buffer-file-name auto-save-default))
;; If auto save is on, start using a new name.
;; We deliberately don't rename or delete the old auto save
;; for the old visited file name. This is because perhaps
;; the user wants to save the new state and then compare with the
;; previous state from the auto save file.
(setq buffer-auto-save-file-name
(make-auto-save-file-name)))
(if buffer-file-name
(set-buffer-modified-p t)))