From: Richard M. Stallman Date: Fri, 14 Jan 1994 20:09:37 +0000 (+0000) Subject: (command_loop_1): If there's an error in the X-Git-Tag: emacs-19.34~10263 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bb62bd918cb213d70e87f10538b2922690d848a1;p=emacs.git (command_loop_1): If there's an error in the post(pre)-command-hook, leave that hook nil. --- diff --git a/src/keyboard.c b/src/keyboard.c index 743bcdfccd2..d75f48e21aa 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -904,7 +904,17 @@ command_loop_1 () /* 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 @@ command_loop_1 () 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)) {