Commit bb62bd91 authored by Richard M. Stallman's avatar Richard M. Stallman

(command_loop_1): If there's an error in the

post(pre)-command-hook, leave that hook nil.
parent 7d6031ba
......@@ -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))
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment