aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index b221da53d7c..7a97ec2919d 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -275,14 +275,14 @@ static Lisp_Object Vauto_save_timeout;
275int num_input_chars; 275int num_input_chars;
276 276
277/* Total number of times read_char has returned, outside of macros. */ 277/* Total number of times read_char has returned, outside of macros. */
278int num_nonmacro_input_chars; 278int num_nonmacro_input_events;
279 279
280/* Auto-save automatically when this many characters have been typed 280/* Auto-save automatically when this many characters have been typed
281 since the last time. */ 281 since the last time. */
282 282
283static int auto_save_interval; 283static int auto_save_interval;
284 284
285/* Value of num_nonmacro_input_chars as of last auto save. */ 285/* Value of num_nonmacro_input_events as of last auto save. */
286 286
287int last_auto_save; 287int last_auto_save;
288 288
@@ -770,7 +770,7 @@ recursive_edit_1 ()
770 770
771record_auto_save () 771record_auto_save ()
772{ 772{
773 last_auto_save = num_nonmacro_input_chars; 773 last_auto_save = num_nonmacro_input_events;
774} 774}
775 775
776/* Make an auto save happen as soon as possible at command level. */ 776/* Make an auto save happen as soon as possible at command level. */
@@ -1894,7 +1894,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
1894 1894
1895 if (commandflag != 0 1895 if (commandflag != 0
1896 && auto_save_interval > 0 1896 && auto_save_interval > 0
1897 && num_nonmacro_input_chars - last_auto_save > max (auto_save_interval, 20) 1897 && num_nonmacro_input_events - last_auto_save > max (auto_save_interval, 20)
1898 && !detect_input_pending_run_timers (0)) 1898 && !detect_input_pending_run_timers (0))
1899 { 1899 {
1900 Fdo_auto_save (Qnil, Qnil); 1900 Fdo_auto_save (Qnil, Qnil);
@@ -1943,7 +1943,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
1943 1943
1944 /* Auto save if enough time goes by without input. */ 1944 /* Auto save if enough time goes by without input. */
1945 if (commandflag != 0 1945 if (commandflag != 0
1946 && num_nonmacro_input_chars > last_auto_save 1946 && num_nonmacro_input_events > last_auto_save
1947 && INTEGERP (Vauto_save_timeout) 1947 && INTEGERP (Vauto_save_timeout)
1948 && XINT (Vauto_save_timeout) > 0) 1948 && XINT (Vauto_save_timeout) > 0)
1949 { 1949 {
@@ -2200,7 +2200,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
2200 /* Re-reading in the middle of a command */ 2200 /* Re-reading in the middle of a command */
2201 reread: 2201 reread:
2202 last_input_char = c; 2202 last_input_char = c;
2203 num_input_chars++; 2203 num_input_events++;
2204 2204
2205 /* Process the help character specially if enabled */ 2205 /* Process the help character specially if enabled */
2206 if (!NILP (Vhelp_form) && help_char_p (c)) 2206 if (!NILP (Vhelp_form) && help_char_p (c))
@@ -2265,7 +2265,7 @@ record_menu_key (c)
2265 2265
2266 /* Re-reading in the middle of a command */ 2266 /* Re-reading in the middle of a command */
2267 last_input_char = c; 2267 last_input_char = c;
2268 num_input_chars++; 2268 num_input_events++;
2269} 2269}
2270 2270
2271/* Return 1 if should recognize C as "the help character". */ 2271/* Return 1 if should recognize C as "the help character". */
@@ -2329,7 +2329,7 @@ record_char (c)
2329 2329
2330 store_kbd_macro_char (c); 2330 store_kbd_macro_char (c);
2331 2331
2332 num_nonmacro_input_chars++; 2332 num_nonmacro_input_events++;
2333} 2333}
2334 2334
2335Lisp_Object 2335Lisp_Object
@@ -8125,15 +8125,15 @@ by position only.");
8125 inhibit_local_menu_bar_menus = 0; 8125 inhibit_local_menu_bar_menus = 0;
8126 8126
8127 DEFVAR_INT ("num-input-keys", &num_input_keys, 8127 DEFVAR_INT ("num-input-keys", &num_input_keys,
8128 "Number of complete key sequences read from the keyboard so far.\n\ 8128 "Number of complete key sequences read as input so far.\n\
8129This includes key sequences read from keyboard macros.\n\ 8129This includes key sequences read from keyboard macros.\n\
8130The number is effectively the number of interactive command invocations."); 8130The number is effectively the number of interactive command invocations.");
8131 num_input_keys = 0; 8131 num_input_keys = 0;
8132 8132
8133 DEFVAR_INT ("num-nonmacro-input-chars", &num_nonmacro_input_chars, 8133 DEFVAR_INT ("num-nonmacro-input-events", &num_nonmacro_input_events,
8134 "Number of characters read from the keyboard so far.\n\ 8134 "Number of input events read from the keyboard so far.\n\
8135Does not include characters read from keyboard macros."); 8135This does not include events generated by keyboard macros.");
8136 num_nonmacro_input_chars = 0; 8136 num_nonmacro_input_events = 0;
8137 8137
8138 DEFVAR_LISP ("last-event-frame", &Vlast_event_frame, 8138 DEFVAR_LISP ("last-event-frame", &Vlast_event_frame,
8139 "The frame in which the most recently read event occurred.\n\ 8139 "The frame in which the most recently read event occurred.\n\