Index: src/gtkhtml-enums.h
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/gtkhtml-enums.h,v
retrieving revision 1.35
diff -p -u -r1.35 gtkhtml-enums.h
--- src/gtkhtml-enums.h	19 May 2003 14:41:02 -0000	1.35
+++ src/gtkhtml-enums.h	14 Jul 2003 09:43:41 -0000
@@ -219,6 +219,9 @@ typedef enum {
 	GTK_HTML_COMMAND_CELL_RSPAN_INC,
 	GTK_HTML_COMMAND_CELL_CSPAN_DEC,
 	GTK_HTML_COMMAND_CELL_RSPAN_DEC,
+
+	GTK_HTML_COMMAND_AUTOSAVED,
+	GTK_HTML_COMMAND_IS_AUTOSAVED,
 } GtkHTMLCommandType;
 
 typedef enum {
Index: src/gtkhtml-properties.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/gtkhtml-properties.c,v
retrieving revision 1.95
diff -p -u -r1.95 gtkhtml-properties.c
--- src/gtkhtml-properties.c	25 Jun 2003 18:15:46 -0000	1.95
+++ src/gtkhtml-properties.c	14 Jul 2003 09:43:41 -0000
@@ -254,6 +254,8 @@ static GEnumValue _gtk_html_command_valu
 	{ GTK_HTML_COMMAND_CELL_RSPAN_INC, "GTK_HTML_COMMAND_CELL_RSPAN_INC", "rspan-inc" },
 	{ GTK_HTML_COMMAND_CELL_CSPAN_DEC, "GTK_HTML_COMMAND_CELL_CSPAN_DEC", "cspan-dec" },
 	{ GTK_HTML_COMMAND_CELL_RSPAN_DEC, "GTK_HTML_COMMAND_CELL_RSPAN_DEC", "rspan-dec" },
+	{ GTK_HTML_COMMAND_AUTOSAVED, "GTK_HTML_COMMAND_AUTOSAVED", "autosaved" },
+	{ GTK_HTML_COMMAND_IS_AUTOSAVED, "GTK_HTML_COMMAND_IS_AUTOSAVED", "is-autosaved" },
 	{ 0, NULL, NULL }
 };
 
Index: src/gtkhtml.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/gtkhtml.c,v
retrieving revision 1.524
diff -p -u -r1.524 gtkhtml.c
--- src/gtkhtml.c	1 Jan 1997 08:09:08 -0000	1.524
+++ src/gtkhtml.c	14 Jul 2003 09:43:43 -0000
@@ -4502,6 +4502,12 @@ command (GtkHTML *html, GtkHTMLCommandTy
 	case GTK_HTML_COMMAND_CELL_RSPAN_DEC:
 		rv = html_engine_rspan_delta (html->engine, -1);
 		break;
+	case GTK_HTML_COMMAND_AUTOSAVED:
+		html_engine_autosaved (html->engine);
+		break;
+	case GTK_HTML_COMMAND_IS_AUTOSAVED:
+		rv = html_engine_is_autosaved (html->engine);
+		break;
 	default:
 		html->binding_handled = FALSE;
 	}
Index: src/htmlengine.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmlengine.c,v
retrieving revision 1.549
diff -p -u -r1.549 htmlengine.c
--- src/htmlengine.c	1 Jan 1997 08:51:31 -0000	1.549
+++ src/htmlengine.c	14 Jul 2003 09:43:46 -0000
@@ -3655,7 +3655,7 @@ html_engine_init (HTMLEngine *engine)
 
 	engine->block = FALSE;
 	engine->save_data = FALSE;
-	engine->saved_step_count = -1;
+	engine->saved_step_count = engine->autosaved_step_count = -1;
 
 	engine->map_table = NULL;
 
@@ -5770,6 +5770,18 @@ void
 html_engine_saved (HTMLEngine *e)
 {
 	e->saved_step_count = html_undo_get_step_count (e->undo);
+}
+
+gboolean
+html_engine_is_autosaved (HTMLEngine *e)
+{
+	return e->autosaved_step_count != -1 && e->autosaved_step_count == html_undo_get_step_count (e->undo);
+}
+
+void
+html_engine_autosaved (HTMLEngine *e)
+{
+	e->autosaved_step_count = html_undo_get_step_count (e->undo);
 }
 
 static void
Index: src/htmlengine.h
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmlengine.h,v
retrieving revision 1.170
diff -p -u -r1.170 htmlengine.h
--- src/htmlengine.h	1 Jan 1997 08:09:08 -0000	1.170
+++ src/htmlengine.h	14 Jul 2003 09:43:46 -0000
@@ -269,6 +269,7 @@ struct _HTMLEngine {
 
 	gboolean save_data;
 	gint saved_step_count;
+	gint autosaved_step_count;
 
 	gboolean expose;
 	gboolean need_update;
@@ -301,6 +302,8 @@ void        html_engine_unrealize     (H
 
 void      html_engine_saved     (HTMLEngine *e);
 gboolean  html_engine_is_saved  (HTMLEngine *e);
+void      html_engine_autosaved (HTMLEngine *e);
+gboolean  html_engine_is_autosaved (HTMLEngine *e);
 
 /* Editability control.  */
 void      html_engine_set_editable  (HTMLEngine *e,
