diff options
| author | Richard M. Stallman | 1992-10-23 11:06:14 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1992-10-23 11:06:14 +0000 |
| commit | 6861ad22b2fbbbd386138e5d0c56f8eadf485c51 (patch) | |
| tree | 48bc9da405aac94c83e811d0a7f2e42a2141c1ff | |
| parent | 45ca32a63ded7eefdb3e871430e1b2d679746401 (diff) | |
| download | emacs-6861ad22b2fbbbd386138e5d0c56f8eadf485c51.tar.gz emacs-6861ad22b2fbbbd386138e5d0c56f8eadf485c51.zip | |
(set-visited-file-name): Change the auto save file name.
| -rw-r--r-- | lisp/files.el | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el index b5ba9a55ef4..6a0737722dd 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -926,7 +926,14 @@ if you wish to pass an empty string as the argument." | |||
| 926 | (setq backup-inhibited t))) | 926 | (setq backup-inhibited t))) |
| 927 | ;; If auto-save was not already on, turn it on if appropriate. | 927 | ;; If auto-save was not already on, turn it on if appropriate. |
| 928 | (if (not buffer-auto-save-file-name) | 928 | (if (not buffer-auto-save-file-name) |
| 929 | (auto-save-mode (and buffer-file-name auto-save-default))) | 929 | (auto-save-mode (and buffer-file-name auto-save-default)) |
| 930 | ;; If auto save is on, start using a new name. | ||
| 931 | ;; We deliberately don't rename or delete the old auto save | ||
| 932 | ;; for the old visited file name. This is because perhaps | ||
| 933 | ;; the user wants to save the new state and then compare with the | ||
| 934 | ;; previous state from the auto save file. | ||
| 935 | (setq buffer-auto-save-file-name | ||
| 936 | (make-auto-save-file-name))) | ||
| 930 | (if buffer-file-name | 937 | (if buffer-file-name |
| 931 | (set-buffer-modified-p t))) | 938 | (set-buffer-modified-p t))) |
| 932 | 939 | ||