Mercurial > emacs
comparison src/keyboard.c @ 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 | 3a35434b19d2 |
children | 09a8da4ffadf |
comparison
equal
deleted
inserted
replaced
8088:a831980bb12e | 8089:df2986993482 |
---|---|
1141 else if (EQ (this_command, Qself_insert_command) | 1141 else if (EQ (this_command, Qself_insert_command) |
1142 /* Try this optimization only on ascii keystrokes. */ | 1142 /* Try this optimization only on ascii keystrokes. */ |
1143 && XTYPE (last_command_char) == Lisp_Int) | 1143 && XTYPE (last_command_char) == Lisp_Int) |
1144 { | 1144 { |
1145 unsigned char c = XINT (last_command_char); | 1145 unsigned char c = XINT (last_command_char); |
1146 | 1146 int value; |
1147 if (NILP (Vexecuting_macro) && | 1147 |
1148 !EQ (minibuf_window, selected_window)) | 1148 if (NILP (Vexecuting_macro) |
1149 && !EQ (minibuf_window, selected_window)) | |
1149 { | 1150 { |
1150 if (!nonundocount || nonundocount >= 20) | 1151 if (!nonundocount || nonundocount >= 20) |
1151 { | 1152 { |
1152 Fundo_boundary (); | 1153 Fundo_boundary (); |
1153 nonundocount = 0; | 1154 nonundocount = 0; |
1154 } | 1155 } |
1155 nonundocount++; | 1156 nonundocount++; |
1156 } | 1157 } |
1157 lose = (XFASTINT (XWINDOW (selected_window)->last_modified) | 1158 lose = ((XFASTINT (XWINDOW (selected_window)->last_modified) |
1158 < MODIFF) | 1159 < MODIFF) |
1159 || (XFASTINT (XWINDOW (selected_window)->last_point) != PT) | 1160 || (XFASTINT (XWINDOW (selected_window)->last_point) |
1160 || MODIFF <= current_buffer->save_modified | 1161 != PT) |
1161 || windows_or_buffers_changed | 1162 || MODIFF <= current_buffer->save_modified |
1162 || !EQ (current_buffer->selective_display, Qnil) | 1163 || windows_or_buffers_changed |
1163 || detect_input_pending () | 1164 || !EQ (current_buffer->selective_display, Qnil) |
1164 || !NILP (Vexecuting_macro); | 1165 || detect_input_pending () |
1165 if (internal_self_insert (c, 0)) | 1166 || !NILP (Vexecuting_macro)); |
1166 { | 1167 value = internal_self_insert (c, 0); |
1167 lose = 1; | 1168 if (value) |
1168 nonundocount = 0; | 1169 lose = 1; |
1169 } | 1170 if (value == 2) |
1170 if (!lose && | 1171 nonundocount = 0; |
1171 (PT == ZV || FETCH_CHAR (PT) == '\n')) | 1172 |
1173 if (!lose | |
1174 && (PT == ZV || FETCH_CHAR (PT) == '\n')) | |
1172 { | 1175 { |
1173 struct Lisp_Vector *dp | 1176 struct Lisp_Vector *dp |
1174 = window_display_table (XWINDOW (selected_window)); | 1177 = window_display_table (XWINDOW (selected_window)); |
1175 int lose = c; | 1178 int lose = c; |
1176 | 1179 |