aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-07-01 20:33:56 +0000
committerRichard M. Stallman1993-07-01 20:33:56 +0000
commite6f0e76cd0c3c148f9e68868e844c5281883c8b2 (patch)
tree4ac6f77d0adc5ecfcdb6c7098468d559faa6e455
parent94142e7881f7d0bbd20468eb280c747791688ccb (diff)
downloademacs-e6f0e76cd0c3c148f9e68868e844c5281883c8b2.tar.gz
emacs-e6f0e76cd0c3c148f9e68868e844c5281883c8b2.zip
(set-visited-file-name): Rename auto-save file only if it exists.
-rw-r--r--lisp/files.el1
1 files changed, 1 insertions, 0 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 66adbba5f20..e9a8f9ba28a 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -1107,6 +1107,7 @@ if you wish to pass an empty string as the argument."
1107 (make-auto-save-file-name))) 1107 (make-auto-save-file-name)))
1108 ;; Rename the old auto save file if any. 1108 ;; Rename the old auto save file if any.
1109 (and oauto buffer-auto-save-file-name 1109 (and oauto buffer-auto-save-file-name
1110 (file-exists-p oauto)
1110 (rename-file oauto buffer-auto-save-file-name t))) 1111 (rename-file oauto buffer-auto-save-file-name t)))
1111 (if buffer-file-name 1112 (if buffer-file-name
1112 (set-buffer-modified-p t))) 1113 (set-buffer-modified-p t)))