From e6f0e76cd0c3c148f9e68868e844c5281883c8b2 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 1 Jul 1993 20:33:56 +0000 Subject: [PATCH] (set-visited-file-name): Rename auto-save file only if it exists. --- lisp/files.el | 1 + 1 file changed, 1 insertion(+) 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))) -- 2.39.5