int num_input_chars;
/* Total number of times read_char has returned, outside of macros. */
-int num_nonmacro_input_chars;
+int num_nonmacro_input_events;
/* Auto-save automatically when this many characters have been typed
since the last time. */
static int auto_save_interval;
-/* Value of num_nonmacro_input_chars as of last auto save. */
+/* Value of num_nonmacro_input_events as of last auto save. */
int last_auto_save;
record_auto_save ()
{
- last_auto_save = num_nonmacro_input_chars;
+ last_auto_save = num_nonmacro_input_events;
}
/* Make an auto save happen as soon as possible at command level. */
if (commandflag != 0
&& auto_save_interval > 0
- && num_nonmacro_input_chars - last_auto_save > max (auto_save_interval, 20)
+ && num_nonmacro_input_events - last_auto_save > max (auto_save_interval, 20)
&& !detect_input_pending_run_timers (0))
{
Fdo_auto_save (Qnil, Qnil);
/* Auto save if enough time goes by without input. */
if (commandflag != 0
- && num_nonmacro_input_chars > last_auto_save
+ && num_nonmacro_input_events > last_auto_save
&& INTEGERP (Vauto_save_timeout)
&& XINT (Vauto_save_timeout) > 0)
{
/* Re-reading in the middle of a command */
reread:
last_input_char = c;
- num_input_chars++;
+ num_input_events++;
/* Process the help character specially if enabled */
if (!NILP (Vhelp_form) && help_char_p (c))
/* Re-reading in the middle of a command */
last_input_char = c;
- num_input_chars++;
+ num_input_events++;
}
/* Return 1 if should recognize C as "the help character". */
store_kbd_macro_char (c);
- num_nonmacro_input_chars++;
+ num_nonmacro_input_events++;
}
Lisp_Object
inhibit_local_menu_bar_menus = 0;
DEFVAR_INT ("num-input-keys", &num_input_keys,
- "Number of complete key sequences read from the keyboard so far.\n\
+ "Number of complete key sequences read as input so far.\n\
This includes key sequences read from keyboard macros.\n\
The number is effectively the number of interactive command invocations.");
num_input_keys = 0;
- DEFVAR_INT ("num-nonmacro-input-chars", &num_nonmacro_input_chars,
- "Number of characters read from the keyboard so far.\n\
-Does not include characters read from keyboard macros.");
- num_nonmacro_input_chars = 0;
+ DEFVAR_INT ("num-nonmacro-input-events", &num_nonmacro_input_events,
+ "Number of input events read from the keyboard so far.\n\
+This does not include events generated by keyboard macros.");
+ num_nonmacro_input_events = 0;
DEFVAR_LISP ("last-event-frame", &Vlast_event_frame,
"The frame in which the most recently read event occurred.\n\