diff src/buffer.h @ 106813:4040ecb0c904

Try to fix bug#5314. This is probably not the final word, tho. * buffer.c (Fset_buffer_modified_p): Try and be careful not to modify recent-auto-save-p as a side-effect. * buffer.h (BUF_AUTOSAVE_MODIFF): New macro. * buffer.c (Fkill_buffer, reset_buffer): * editfns.c (Fsubst_char_in_region): * fileio.c (Finsert_file_contents, Fdo_auto_save) (Fset_buffer_auto_saved, Frecent_auto_save_p): Use it.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 12 Jan 2010 23:33:42 -0500
parents f2cea199b0c4
children c5f9e4613394 376148b31b5e
line wrap: on
line diff
--- a/src/buffer.h	Wed Jan 13 10:40:39 2010 +0900
+++ b/src/buffer.h	Tue Jan 12 23:33:42 2010 -0500
@@ -1,6 +1,6 @@
 /* Header file for the buffer manipulation primitives.
    Copyright (C) 1985, 1986, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001,
-                 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+                 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
                  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -158,6 +158,10 @@
 /* Overlay modification count.  */
 #define BUF_OVERLAY_MODIFF(buf) ((buf)->text->overlay_modiff)
 
+/* Modification count as of last auto-save.  */
+/* FIXME: should we move this into ->text->auto_save_modiff?  */
+#define BUF_AUTOSAVE_MODIFF(buf) ((buf)->auto_save_modified)
+
 /* Interval tree of buffer.  */
 #define BUF_INTERVALS(buf) ((buf)->text->intervals)