Mercurial > emacs
changeset 1471:2e29ad2afc42
(set-visited-file-name): Change the auto save file name.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 23 Oct 1992 11:06:14 +0000 |
parents | eb4043bd65ef |
children | 59b6f3d6aa26 |
files | lisp/files.el |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/files.el Fri Oct 23 09:38:44 1992 +0000 +++ b/lisp/files.el Fri Oct 23 11:06:14 1992 +0000 @@ -926,7 +926,14 @@ (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)))