summaryrefslogtreecommitdiff
path: root/doc/lispref/hooks.texi
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2016-01-13 19:38:06 +0200
committerEli Zaretskii <eliz@gnu.org>2016-01-13 19:38:06 +0200
commitd3776e9f7c9e6ae3ac4c5afff0c33bff73665759 (patch)
tree71384adcc6713afe3164f2d25143b66271b2f142 /doc/lispref/hooks.texi
parentd022b707d654c24171a3baf951ca8e5e13a0b77a (diff)
downloademacs-d3776e9f7c9e6ae3ac4c5afff0c33bff73665759.tar.gz
emacs-d3776e9f7c9e6ae3ac4c5afff0c33bff73665759.tar.bz2
emacs-d3776e9f7c9e6ae3ac4c5afff0c33bff73665759.zip
Document the new prefix-command hooks
* doc/lispref/hooks.texi (Standard Hooks): Document `prefix-command-echo-keystrokes-functions' and `prefix-command-preserve-state-hook'.
Diffstat (limited to 'doc/lispref/hooks.texi')
-rw-r--r--doc/lispref/hooks.texi16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/lispref/hooks.texi b/doc/lispref/hooks.texi
index cbbaa8e5ea0..b8f761de30e 100644
--- a/doc/lispref/hooks.texi
+++ b/doc/lispref/hooks.texi
@@ -190,6 +190,22 @@ Hook run when about to switch windows with a mouse command.
@item post-self-insert-hook
@xref{Keymaps and Minor Modes}.
+@item prefix-command-echo-keystrokes-functions
+@vindex prefix-command-echo-keystrokes-functions
+An abnormal hook run by prefix commands (such as @kbd{C-u}) which
+should return a string describing the current prefix state. For
+example, @kbd{C-u} produces @samp{C-u-} and @samp{C-u 1 2 3-}. Each
+hook function is called with no arguments and should return a string
+describing the current prefix state, or @code{nil} if there's no
+prefix state. @xref{Prefix Command Arguments}.
+
+@item prefix-command-preserve-state-hook
+@vindex prefix-command-preserve-state-hook
+Hook run when a prefix command needs to preserve the prefix by passing
+the current prefix command state to the next command. For example,
+@kbd{C-u} needs to pass the state to the next command when the user
+types @kbd{C-u -} or follows @kbd{C-u} with a digit.
+
@ignore
@item prog-mode-hook
@itemx special-mode-hook