changeset 8089:df2986993482

(command_loop_1): Don't clear nonundocount when internal_self_insert returns 1.
author Richard M. Stallman <rms@gnu.org>
date Wed, 29 Jun 1994 19:52:17 +0000
parents a831980bb12e
children bb03e344f07e
files src/keyboard.c
diffstat 1 files changed, 21 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/src/keyboard.c	Wed Jun 29 19:51:33 1994 +0000
+++ b/src/keyboard.c	Wed Jun 29 19:52:17 1994 +0000
@@ -1143,9 +1143,10 @@
 		       && XTYPE (last_command_char) == Lisp_Int)
 		{
 		  unsigned char c = XINT (last_command_char);
-
-		  if (NILP (Vexecuting_macro) &&
-		      !EQ (minibuf_window, selected_window))
+		  int value;
+
+		  if (NILP (Vexecuting_macro)
+		      && !EQ (minibuf_window, selected_window))
 		    {
 		      if (!nonundocount || nonundocount >= 20)
 			{
@@ -1154,21 +1155,23 @@
 			}
 		      nonundocount++;
 		    }
-		  lose = (XFASTINT (XWINDOW (selected_window)->last_modified)
-			  < MODIFF)
-		    || (XFASTINT (XWINDOW (selected_window)->last_point) != PT)
-		    || MODIFF <= current_buffer->save_modified
-		    || windows_or_buffers_changed
-		    || !EQ (current_buffer->selective_display, Qnil)
-		    || detect_input_pending ()
-		    || !NILP (Vexecuting_macro);
-		  if (internal_self_insert (c, 0))
-		    {
-		      lose = 1;
-		      nonundocount = 0;
-		    }
-		  if (!lose &&
-		      (PT == ZV || FETCH_CHAR (PT) == '\n'))
+		  lose = ((XFASTINT (XWINDOW (selected_window)->last_modified)
+			   < MODIFF)
+			  || (XFASTINT (XWINDOW (selected_window)->last_point)
+			      != PT)
+			  || MODIFF <= current_buffer->save_modified
+			  || windows_or_buffers_changed
+			  || !EQ (current_buffer->selective_display, Qnil)
+			  || detect_input_pending ()
+			  || !NILP (Vexecuting_macro));
+		  value = internal_self_insert (c, 0);
+		  if (value)
+		    lose = 1;
+		  if (value == 2)
+		    nonundocount = 0;
+
+		  if (!lose
+		      && (PT == ZV || FETCH_CHAR (PT) == '\n'))
 		    {
 		      struct Lisp_Vector *dp
 			= window_display_table (XWINDOW (selected_window));