From: Lars Ingebrigtsen Date: Wed, 25 Aug 2021 09:49:52 +0000 (+0200) Subject: Further checks for kill-buffer-delete-auto-save-files X-Git-Tag: emacs-28.0.90~1322 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=de645109732899fcd6f1b88142c66c1ee799665c;p=emacs.git Further checks for kill-buffer-delete-auto-save-files * src/buffer.c (Fkill_buffer): Check that the auto-save file exists before asking whether to delete it. --- diff --git a/src/buffer.c b/src/buffer.c index 7ba0c8bc2a6..5951040ff2c 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1798,6 +1798,8 @@ cleaning up all windows currently displaying the buffer to be killed. */) /* Delete the autosave file, if requested. */ if (modified + && STRINGP (BVAR (b, auto_save_file_name)) + && !NILP (Ffile_exists_p (BVAR (b, auto_save_file_name))) && kill_buffer_delete_auto_save_files && delete_auto_save_files && !NILP (Frecent_auto_save_p ()))