diff options
| author | Richard M. Stallman | 1998-01-27 01:45:58 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-01-27 01:45:58 +0000 |
| commit | 84ee60480316e89416eda2ee8b7d200dd2302809 (patch) | |
| tree | 6d31823615c51953c8c9ef06c9e821ed0b994a56 /src | |
| parent | 747c1a5ede7bc4f2b372f51237ba4c5805855646 (diff) | |
| download | emacs-84ee60480316e89416eda2ee8b7d200dd2302809.tar.gz emacs-84ee60480316e89416eda2ee8b7d200dd2302809.zip | |
(command_loop_1): Run post-command-hook before,
not after, clearing this-command-keys and updating last-command.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index e297162cac2..83134989fa8 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -1432,6 +1432,22 @@ command_loop_1 () | |||
| 1432 | } | 1432 | } |
| 1433 | directly_done: ; | 1433 | directly_done: ; |
| 1434 | 1434 | ||
| 1435 | /* Note that the value cell will never directly contain nil | ||
| 1436 | if the symbol is a local variable. */ | ||
| 1437 | if (!NILP (Vpost_command_hook) && !NILP (Vrun_hooks)) | ||
| 1438 | safe_run_hooks (Qpost_command_hook); | ||
| 1439 | |||
| 1440 | if (!NILP (Vdeferred_action_list)) | ||
| 1441 | safe_run_hooks (Qdeferred_action_function); | ||
| 1442 | |||
| 1443 | if (!NILP (Vpost_command_idle_hook) && !NILP (Vrun_hooks)) | ||
| 1444 | { | ||
| 1445 | if (NILP (Vunread_command_events) | ||
| 1446 | && NILP (Vexecuting_macro) | ||
| 1447 | && !NILP (sit_for (0, post_command_idle_delay, 0, 1, 1))) | ||
| 1448 | safe_run_hooks (Qpost_command_idle_hook); | ||
| 1449 | } | ||
| 1450 | |||
| 1435 | /* If there is a prefix argument, | 1451 | /* If there is a prefix argument, |
| 1436 | 1) We don't want Vlast_command to be ``universal-argument'' | 1452 | 1) We don't want Vlast_command to be ``universal-argument'' |
| 1437 | (that would be dumb), so don't set Vlast_command, | 1453 | (that would be dumb), so don't set Vlast_command, |
| @@ -1453,22 +1469,6 @@ command_loop_1 () | |||
| 1453 | this_single_command_key_start = 0; | 1469 | this_single_command_key_start = 0; |
| 1454 | } | 1470 | } |
| 1455 | 1471 | ||
| 1456 | /* Note that the value cell will never directly contain nil | ||
| 1457 | if the symbol is a local variable. */ | ||
| 1458 | if (!NILP (Vpost_command_hook) && !NILP (Vrun_hooks)) | ||
| 1459 | safe_run_hooks (Qpost_command_hook); | ||
| 1460 | |||
| 1461 | if (!NILP (Vdeferred_action_list)) | ||
| 1462 | safe_run_hooks (Qdeferred_action_function); | ||
| 1463 | |||
| 1464 | if (!NILP (Vpost_command_idle_hook) && !NILP (Vrun_hooks)) | ||
| 1465 | { | ||
| 1466 | if (NILP (Vunread_command_events) | ||
| 1467 | && NILP (Vexecuting_macro) | ||
| 1468 | && !NILP (sit_for (0, post_command_idle_delay, 0, 1, 1))) | ||
| 1469 | safe_run_hooks (Qpost_command_idle_hook); | ||
| 1470 | } | ||
| 1471 | |||
| 1472 | if (!NILP (current_buffer->mark_active) && !NILP (Vrun_hooks)) | 1472 | if (!NILP (current_buffer->mark_active) && !NILP (Vrun_hooks)) |
| 1473 | { | 1473 | { |
| 1474 | if (!NILP (Vdeactivate_mark) && !NILP (Vtransient_mark_mode)) | 1474 | if (!NILP (Vdeactivate_mark) && !NILP (Vtransient_mark_mode)) |