From: Richard M. Stallman Date: Thu, 1 Jul 1993 20:33:56 +0000 (+0000) Subject: (set-visited-file-name): Rename auto-save file only if it exists. X-Git-Tag: emacs-19.34~11905 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e6f0e76cd0c3c148f9e68868e844c5281883c8b2;p=emacs.git (set-visited-file-name): Rename auto-save file only if it exists. --- 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." (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)))