aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorArtur Malabarba2015-10-25 14:34:18 +0000
committerArtur Malabarba2015-10-25 14:39:07 +0000
commit12941b99d16835b5de3f065545ebe6a0835a1d0f (patch)
tree69dbf7a84d6c47b142df44ba21ecb5ac0cfb4f79 /src
parent2a85bf6a8e27dafd1005505a43cf9c4aff0957ea (diff)
downloademacs-12941b99d16835b5de3f065545ebe6a0835a1d0f.tar.gz
emacs-12941b99d16835b5de3f065545ebe6a0835a1d0f.zip
* src/keyboard.c (post-command-hook): Extend the docstring
Mainly, explain how to use it without hanging Emacs, or giving the impression that it is hanging. Also mention `pre-command-hook'. (pre-command-hook): Mention `post-command-hook'.
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 1a78f6a705c..4ea0f97e77f 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -11374,14 +11374,26 @@ Buffer modification stores t in this variable. */);
11374 doc: /* Normal hook run before each command is executed. 11374 doc: /* Normal hook run before each command is executed.
11375If an unhandled error happens in running this hook, 11375If an unhandled error happens in running this hook,
11376the function in which the error occurred is unconditionally removed, since 11376the function in which the error occurred is unconditionally removed, since
11377otherwise the error might happen repeatedly and make Emacs nonfunctional. */); 11377otherwise the error might happen repeatedly and make Emacs nonfunctional.
11378
11379See also `pre-command-hook'. */);
11378 Vpre_command_hook = Qnil; 11380 Vpre_command_hook = Qnil;
11379 11381
11380 DEFVAR_LISP ("post-command-hook", Vpost_command_hook, 11382 DEFVAR_LISP ("post-command-hook", Vpost_command_hook,
11381 doc: /* Normal hook run after each command is executed. 11383 doc: /* Normal hook run after each command is executed.
11382If an unhandled error happens in running this hook, 11384If an unhandled error happens in running this hook,
11383the function in which the error occurred is unconditionally removed, since 11385the function in which the error occurred is unconditionally removed, since
11384otherwise the error might happen repeatedly and make Emacs nonfunctional. */); 11386otherwise the error might happen repeatedly and make Emacs nonfunctional.
11387
11388It is usually a bad idea to use this hook for expensive processing.
11389If unavoidable, `while-no-input' can be used avoid making Emacs
11390unresponsive while the user types. Furthermore, this hook is run
11391before redisplay, so the effect of the executed command won't be
11392displayed on the buffer until after the hook has finished (giving the
11393impression that Emacs is hanging). You can call `redisplay' inside
11394`while-no-input' to avoid this.
11395
11396See also `pre-command-hook'. */);
11385 Vpost_command_hook = Qnil; 11397 Vpost_command_hook = Qnil;
11386 11398
11387#if 0 11399#if 0