int last_auto_save;
-/* Last command executed by the editor command loop, not counting
- commands that set the prefix argument. */
-
-Lisp_Object last_command;
-
/* The command being executed by the command loop.
- Commands may set this, and the value set will be copied into last_command
- instead of the actual command. */
+ Commands may set this, and the value set will be copied into
+ current_kboard->Vlast_command instead of the actual command. */
Lisp_Object this_command;
/* The value of point when the last command was executed. */
call0 (Vdeferred_action_function);
/* Do this after running Vpost_command_hook, for consistency. */
- last_command = this_command;
+ current_kboard->Vlast_command = this_command;
while (1)
{
safe_run_hooks (Qdeferred_action_function);
/* If there is a prefix argument,
- 1) We don't want last_command to be ``universal-argument''
- (that would be dumb), so don't set last_command,
+ 1) We don't want Vlast_command to be ``universal-argument''
+ (that would be dumb), so don't set Vlast_command,
2) we want to leave echoing on so that the prefix will be
echoed as part of this key sequence, so don't call
cancel_echoing, and
not echo it a second time. */
if (NILP (current_kboard->Vprefix_arg))
{
- last_command = this_command;
+ current_kboard->Vlast_command = this_command;
cancel_echoing ();
this_command_key_count = 0;
}
init_kboard (kb)
KBOARD *kb;
{
+ kb->Vlast_command = Qnil;
kb->Vprefix_arg = Qnil;
kb->kbd_queue = Qnil;
kb->kbd_queue_has_data = 0;
turns into this character followed by foo.");
XSETINT (meta_prefix_char, 033);
- DEFVAR_LISP ("last-command", &last_command,
+ DEFVAR_KBOARD ("last-command", Vlast_command,
"The last command executed. Normally a symbol with a function definition,\n\
but can be whatever was found in the keymap, or whatever the variable\n\
`this-command' was set to by that command.\n\
\n\
The value `kill-region' is special; it means that the previous command\n\
was a kill command.");
- last_command = Qnil;
DEFVAR_LISP ("this-command", &this_command,
"The command now being executed.\n\