Don't reset post-command-hook to nil upon error.
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 28 Mar 2011 20:26:35 +0000 (16:26 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 28 Mar 2011 20:26:35 +0000 (16:26 -0400)
commitf6d6298639ae43539581c2079666d76a54f1557e
tree851ead8f971b04dc30905d465e305e3d9efdf49d
parent947b656632a76ebb01eda0550c34b1ac43684a98
Don't reset post-command-hook to nil upon error.
* src/eval.c (enum run_hooks_condition): Remove.
(funcall_nil, funcall_not): New functions.
(run_hook_with_args): Call each function through a `funcall' argument.
Remove `cond' argument, now redundant.
(Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success)
(Frun_hook_with_args_until_failure): Adjust accordingly.
(run_hook_wrapped_funcall, Frun_hook_wrapped): New functions.
* src/keyboard.c (safe_run_hook_funcall): New function.
(safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error,
don't set the hook to nil, but remove the offending function instead.
(Qcommand_hook_internal): Remove, unused.
(syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define
Vcommand_hook_internal.
* doc/lispref/commands.texi (Command Overview): post-command-hook is not reset
to nil any more.
doc/lispref/ChangeLog
doc/lispref/commands.texi
etc/NEWS
src/ChangeLog
src/eval.c
src/keyboard.c
src/lisp.h