# HG changeset patch # User Richard M. Stallman # Date 885865558 0 # Node ID bfc5d6ebba37a71ce4e4140fb41fd99969e8f8ea # Parent 8a36e43748c087b8af69cfc0f0bae1e369c801c8 (command_loop_1): Run post-command-hook before, not after, clearing this-command-keys and updating last-command. diff -r 8a36e43748c0 -r bfc5d6ebba37 src/keyboard.c --- a/src/keyboard.c Tue Jan 27 00:46:32 1998 +0000 +++ b/src/keyboard.c Tue Jan 27 01:45:58 1998 +0000 @@ -1432,6 +1432,22 @@ } directly_done: ; + /* Note that the value cell will never directly contain nil + if the symbol is a local variable. */ + if (!NILP (Vpost_command_hook) && !NILP (Vrun_hooks)) + safe_run_hooks (Qpost_command_hook); + + if (!NILP (Vdeferred_action_list)) + safe_run_hooks (Qdeferred_action_function); + + if (!NILP (Vpost_command_idle_hook) && !NILP (Vrun_hooks)) + { + if (NILP (Vunread_command_events) + && NILP (Vexecuting_macro) + && !NILP (sit_for (0, post_command_idle_delay, 0, 1, 1))) + safe_run_hooks (Qpost_command_idle_hook); + } + /* If there is a prefix argument, 1) We don't want Vlast_command to be ``universal-argument'' (that would be dumb), so don't set Vlast_command, @@ -1453,22 +1469,6 @@ this_single_command_key_start = 0; } - /* Note that the value cell will never directly contain nil - if the symbol is a local variable. */ - if (!NILP (Vpost_command_hook) && !NILP (Vrun_hooks)) - safe_run_hooks (Qpost_command_hook); - - if (!NILP (Vdeferred_action_list)) - safe_run_hooks (Qdeferred_action_function); - - if (!NILP (Vpost_command_idle_hook) && !NILP (Vrun_hooks)) - { - if (NILP (Vunread_command_events) - && NILP (Vexecuting_macro) - && !NILP (sit_for (0, post_command_idle_delay, 0, 1, 1))) - safe_run_hooks (Qpost_command_idle_hook); - } - if (!NILP (current_buffer->mark_active) && !NILP (Vrun_hooks)) { if (!NILP (Vdeactivate_mark) && !NILP (Vtransient_mark_mode))