summaryrefslogtreecommitdiff
path: root/src/buffer.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2001-11-06 04:48:15 +0000
committerRichard M. Stallman <rms@gnu.org>2001-11-06 04:48:15 +0000
commit9cf712eb57c0a1fef56487508e89d08c91f98db1 (patch)
tree67d2fc1cac99a4e1f72d5a04390d0ea42857d93b /src/buffer.c
parent2bb659660ed7aff6dab10d30e914368993c6f855 (diff)
downloademacs-9cf712eb57c0a1fef56487508e89d08c91f98db1.tar.gz
(Fkill_buffer): Don't delete auto save file if buffer is modified.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/buffer.c b/src/buffer.c
index d96c3dfba7a..2f320f5bb85 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1367,10 +1367,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"));