# HG changeset patch # User Richard M. Stallman # Date 772919537 0 # Node ID df29869934823c7b6dcb9ee59d0e5480a8041170 # Parent a831980bb12ea07859b56c8e76b19725882ebcf3 (command_loop_1): Don't clear nonundocount when internal_self_insert returns 1. diff -r a831980bb12e -r df2986993482 src/keyboard.c --- 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));