]> git.eshelyaron.com Git - emacs.git/commitdiff
(set-visited-file-name): Rename auto-save file only if it exists.
authorRichard M. Stallman <rms@gnu.org>
Thu, 1 Jul 1993 20:33:56 +0000 (20:33 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 1 Jul 1993 20:33:56 +0000 (20:33 +0000)
lisp/files.el

index 66adbba5f207a8e2c3308a5e4168dbdcbc8fe968..e9a8f9ba28ae270c1d34762f00957b3466e74729 100644 (file)
@@ -1107,6 +1107,7 @@ if you wish to pass an empty string as the argument."
            (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)))