aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer1995-06-09 03:03:46 +0000
committerKarl Heuer1995-06-09 03:03:46 +0000
commit6c7178b9956cb69bb53b5b2c84678ea9f503fe7d (patch)
treea50dec829ed914c003bad448f17fabcfa34846de /src
parent92abb02b9b65b95807fd8fdccad10feed0dd3a96 (diff)
downloademacs-6c7178b9956cb69bb53b5b2c84678ea9f503fe7d.tar.gz
emacs-6c7178b9956cb69bb53b5b2c84678ea9f503fe7d.zip
(last_command): Var deleted; now part of struct kboard.
(command_loop_1): Make last_command be kboard-local. (syms_of_keyboard): Defvar it. (init_kboard): Initialize it.
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index fa8b1fad67a..6e4485b1460 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -247,14 +247,9 @@ static int auto_save_interval;
247 247
248int last_auto_save; 248int last_auto_save;
249 249
250/* Last command executed by the editor command loop, not counting
251 commands that set the prefix argument. */
252
253Lisp_Object last_command;
254
255/* The command being executed by the command loop. 250/* The command being executed by the command loop.
256 Commands may set this, and the value set will be copied into last_command 251 Commands may set this, and the value set will be copied into
257 instead of the actual command. */ 252 current_kboard->Vlast_command instead of the actual command. */
258Lisp_Object this_command; 253Lisp_Object this_command;
259 254
260/* The value of point when the last command was executed. */ 255/* The value of point when the last command was executed. */
@@ -1075,7 +1070,7 @@ command_loop_1 ()
1075 call0 (Vdeferred_action_function); 1070 call0 (Vdeferred_action_function);
1076 1071
1077 /* Do this after running Vpost_command_hook, for consistency. */ 1072 /* Do this after running Vpost_command_hook, for consistency. */
1078 last_command = this_command; 1073 current_kboard->Vlast_command = this_command;
1079 1074
1080 while (1) 1075 while (1)
1081 { 1076 {
@@ -1349,8 +1344,8 @@ command_loop_1 ()
1349 safe_run_hooks (Qdeferred_action_function); 1344 safe_run_hooks (Qdeferred_action_function);
1350 1345
1351 /* If there is a prefix argument, 1346 /* If there is a prefix argument,
1352 1) We don't want last_command to be ``universal-argument'' 1347 1) We don't want Vlast_command to be ``universal-argument''
1353 (that would be dumb), so don't set last_command, 1348 (that would be dumb), so don't set Vlast_command,
1354 2) we want to leave echoing on so that the prefix will be 1349 2) we want to leave echoing on so that the prefix will be
1355 echoed as part of this key sequence, so don't call 1350 echoed as part of this key sequence, so don't call
1356 cancel_echoing, and 1351 cancel_echoing, and
@@ -1359,7 +1354,7 @@ command_loop_1 ()
1359 not echo it a second time. */ 1354 not echo it a second time. */
1360 if (NILP (current_kboard->Vprefix_arg)) 1355 if (NILP (current_kboard->Vprefix_arg))
1361 { 1356 {
1362 last_command = this_command; 1357 current_kboard->Vlast_command = this_command;
1363 cancel_echoing (); 1358 cancel_echoing ();
1364 this_command_key_count = 0; 1359 this_command_key_count = 0;
1365 } 1360 }
@@ -6604,6 +6599,7 @@ void
6604init_kboard (kb) 6599init_kboard (kb)
6605 KBOARD *kb; 6600 KBOARD *kb;
6606{ 6601{
6602 kb->Vlast_command = Qnil;
6607 kb->Vprefix_arg = Qnil; 6603 kb->Vprefix_arg = Qnil;
6608 kb->kbd_queue = Qnil; 6604 kb->kbd_queue = Qnil;
6609 kb->kbd_queue_has_data = 0; 6605 kb->kbd_queue_has_data = 0;
@@ -6922,7 +6918,7 @@ so that you can determine whether the command was run by mouse or not.");
6922turns into this character followed by foo."); 6918turns into this character followed by foo.");
6923 XSETINT (meta_prefix_char, 033); 6919 XSETINT (meta_prefix_char, 033);
6924 6920
6925 DEFVAR_LISP ("last-command", &last_command, 6921 DEFVAR_KBOARD ("last-command", Vlast_command,
6926 "The last command executed. Normally a symbol with a function definition,\n\ 6922 "The last command executed. Normally a symbol with a function definition,\n\
6927but can be whatever was found in the keymap, or whatever the variable\n\ 6923but can be whatever was found in the keymap, or whatever the variable\n\
6928`this-command' was set to by that command.\n\ 6924`this-command' was set to by that command.\n\
@@ -6934,7 +6930,6 @@ command exit.\n\
6934\n\ 6930\n\
6935The value `kill-region' is special; it means that the previous command\n\ 6931The value `kill-region' is special; it means that the previous command\n\
6936was a kill command."); 6932was a kill command.");
6937 last_command = Qnil;
6938 6933
6939 DEFVAR_LISP ("this-command", &this_command, 6934 DEFVAR_LISP ("this-command", &this_command,
6940 "The command now being executed.\n\ 6935 "The command now being executed.\n\