aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorLars Ingebrigtsen2021-08-25 11:58:27 +0200
committerLars Ingebrigtsen2021-08-25 11:58:27 +0200
commit64b4c85637d9d5aa98ddc4f006f24cbd28727416 (patch)
treec5418b3eb4ce03399ea93d28ac5c01f298914dec /src/buffer.c
parentde645109732899fcd6f1b88142c66c1ee799665c (diff)
downloademacs-64b4c85637d9d5aa98ddc4f006f24cbd28727416.tar.gz
emacs-64b4c85637d9d5aa98ddc4f006f24cbd28727416.zip
Fix up deleting auto-save/killing buffer wrt. `auto-save-visited-mode'
* src/buffer.c (Fkill_buffer): Respect `auto-save-visited-mode'.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 5951040ff2c..100ebc7e2de 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1798,11 +1798,15 @@ cleaning up all windows currently displaying the buffer to be killed. */)
1798 1798
1799 /* Delete the autosave file, if requested. */ 1799 /* Delete the autosave file, if requested. */
1800 if (modified 1800 if (modified
1801 && STRINGP (BVAR (b, auto_save_file_name))
1802 && !NILP (Ffile_exists_p (BVAR (b, auto_save_file_name)))
1803 && kill_buffer_delete_auto_save_files 1801 && kill_buffer_delete_auto_save_files
1804 && delete_auto_save_files 1802 && delete_auto_save_files
1805 && !NILP (Frecent_auto_save_p ())) 1803 && !NILP (Frecent_auto_save_p ())
1804 && STRINGP (BVAR (b, auto_save_file_name))
1805 && !NILP (Ffile_exists_p (BVAR (b, auto_save_file_name)))
1806 /* If `auto-save-visited-mode' is on, then we're auto-saving
1807 to the visited file -- don't delete it.. */
1808 && NILP (Fstring_equal (BVAR (b, auto_save_file_name),
1809 BVAR (b, filename))))
1806 { 1810 {
1807 tem = do_yes_or_no_p (build_string ("Delete auto-save file? ")); 1811 tem = do_yes_or_no_p (build_string ("Delete auto-save file? "));
1808 if (!NILP (tem)) 1812 if (!NILP (tem))