# HG changeset patch # User Richard M. Stallman # Date 758578177 0 # Node ID b9cd3a5eda552ae75eb07b70859b6663e382c9e2 # Parent fd409e42991a87b7e44f552f6262db15c91acc93 (command_loop_1): If there's an error in the post(pre)-command-hook, leave that hook nil. diff -r fd409e42991a -r b9cd3a5eda55 src/keyboard.c --- a/src/keyboard.c Fri Jan 14 18:47:00 1994 +0000 +++ b/src/keyboard.c Fri Jan 14 20:09:37 1994 +0000 @@ -904,7 +904,17 @@ /* Make sure this hook runs after commands that get errors and throw to top level. */ if (!NILP (Vpost_command_hook)) - call1 (Vrun_hooks, Qpost_command_hook); + { + Lisp_Object tem; + /* If we get an error during the post-command-hook, + cause post-command-hook to be nil. */ + tem = Vpost_command_hook; + Vpost_command_hook = Qnil; + + call1 (Vrun_hooks, Qpost_command_hook); + + Vpost_command_hook = tem; + } while (1) { @@ -1047,7 +1057,17 @@ this_command = cmd; if (!NILP (Vpre_command_hook)) - call1 (Vrun_hooks, Qpre_command_hook); + { + Lisp_Object tem; + /* If we get an error during the pre-command-hook, + cause pre-command-hook to be nil. */ + tem = Vpre_command_hook; + Vpre_command_hook = Qnil; + + call1 (Vrun_hooks, Qpre_command_hook); + + Vpre_command_hook = tem; + } if (NILP (this_command)) {