aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-06-29 19:52:17 +0000
committerRichard M. Stallman1994-06-29 19:52:17 +0000
commitfc9cce4ec4d5ea6c24106c09efa5e3a8204dc994 (patch)
tree6e26dfd533f79ee8d81596a216bfc0d90a146e97 /src
parentaa52fef958fc7f22b6d90100956bfddd9d2bd77b (diff)
downloademacs-fc9cce4ec4d5ea6c24106c09efa5e3a8204dc994.tar.gz
emacs-fc9cce4ec4d5ea6c24106c09efa5e3a8204dc994.zip
(command_loop_1): Don't clear nonundocount
when internal_self_insert returns 1.
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c37
1 files changed, 20 insertions, 17 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 100857f8e5a..381d8ff4804 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1143,9 +1143,10 @@ command_loop_1 ()
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 int value;
1146 1147
1147 if (NILP (Vexecuting_macro) && 1148 if (NILP (Vexecuting_macro)
1148 !EQ (minibuf_window, selected_window)) 1149 && !EQ (minibuf_window, selected_window))
1149 { 1150 {
1150 if (!nonundocount || nonundocount >= 20) 1151 if (!nonundocount || nonundocount >= 20)
1151 { 1152 {
@@ -1154,21 +1155,23 @@ command_loop_1 ()
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));