changeset 3946:535f1f575d04

(set-visited-file-name): Rename auto-save file only if it exists.
author Richard M. Stallman <rms@gnu.org>
date Thu, 01 Jul 1993 20:33:56 +0000
parents 7a8d0a08eac7
children 924d8515c250
files lisp/files.el
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Thu Jul 01 20:25:42 1993 +0000
+++ b/lisp/files.el	Thu Jul 01 20:33:56 1993 +0000
@@ -1107,6 +1107,7 @@
 	    (make-auto-save-file-name)))
     ;; Rename the old auto save file if any.
     (and oauto buffer-auto-save-file-name
+	 (file-exists-p oauto)
 	 (rename-file oauto buffer-auto-save-file-name t)))
   (if buffer-file-name
       (set-buffer-modified-p t)))