changeset 40760:aa9b081b3a0d

(Fkill_buffer): Don't delete auto save file if buffer is modified.
author Richard M. Stallman <rms@gnu.org>
date Tue, 06 Nov 2001 04:48:15 +0000
parents 7441fb1a40ac
children 9e25b744a97e
files src/buffer.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/buffer.c	Tue Nov 06 04:44:51 2001 +0000
+++ b/src/buffer.c	Tue Nov 06 04:48:15 2001 +0000
@@ -1367,10 +1367,12 @@
   frames_discard_buffer (buf);
   Vinhibit_quit = tem;
 
-  /* Delete any auto-save file, if we saved it in this session.  */
+  /* Delete any auto-save file, if we saved it in this session.
+     But not if the buffer is modified.  */
   if (STRINGP (b->auto_save_file_name)
       && b->auto_save_modified != 0
-      && BUF_SAVE_MODIFF (b) < b->auto_save_modified)
+      && BUF_SAVE_MODIFF (b) < b->auto_save_modified
+      && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b))
     {
       Lisp_Object tem;
       tem = Fsymbol_value (intern ("delete-auto-save-files"));