Variable: pre-command-hook

pre-command-hook is a variable defined in keyboard.c.

Documentation

Normal hook run before each command is executed.

If an unhandled error happens in running this hook, the function in which the error occurred is unconditionally removed, since otherwise the error might happen repeatedly and make Emacs nonfunctional.

See also post-command-hook.

Probably introduced at or before Emacs version 19.20.

Source Code

// Defined in /usr/src/emacs/src/keyboard.c
  DEFVAR_LISP ("pre-command-hook", Vpre_command_hook,
	       doc: /* Normal hook run before each command is executed.
If an unhandled error happens in running this hook,
the function in which the error occurred is unconditionally removed, since
otherwise the error might happen repeatedly and make Emacs nonfunctional.

See also `post-command-hook'.  */);