]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fkill_buffer): Don't delete auto save file if buffer is modified.
authorRichard M. Stallman <rms@gnu.org>
Tue, 6 Nov 2001 04:49:58 +0000 (04:49 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 6 Nov 2001 04:49:58 +0000 (04:49 +0000)
src/buffer.c

index 902d818f23031b09eaa631b77e3f66542e8b1f22..7282ede179ee2d9413a611bf54701e18e2f18ef9 100644 (file)
@@ -1310,10 +1310,12 @@ with SIGHUP.")
   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"));