]> git.eshelyaron.com Git - emacs.git/commitdiff
Document the new prefix-command hooks
authorEli Zaretskii <eliz@gnu.org>
Wed, 13 Jan 2016 17:38:06 +0000 (19:38 +0200)
committerEli Zaretskii <eliz@gnu.org>
Wed, 13 Jan 2016 17:38:06 +0000 (19:38 +0200)
* doc/lispref/hooks.texi (Standard Hooks): Document
`prefix-command-echo-keystrokes-functions' and
`prefix-command-preserve-state-hook'.

doc/lispref/hooks.texi
etc/NEWS

index cbbaa8e5ea0b18827e30f9f80e1f68f7c0884669..b8f761de30ef12360516aed431433a5796d863ee 100644 (file)
@@ -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
index 6323b24dae3a018669e868822995745b97825413..5a1adff0920258849a0bb40fb7833c377fbc58a9 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1335,9 +1335,10 @@ that happen, `unhandled-file-name-directory' now defaults to calling
 ** syntax-propertize is now automatically called on-demand during forward
 parsing functions like `forward-sexp'.
 
-** New hooks prefix-command-echo-keystrokes-functions and
-prefix-command-preserve-state-hook, to allow the definition of prefix
-commands other than the predefined C-u.
++++
+** New hooks `prefix-command-echo-keystrokes-functions' and
+`prefix-command-preserve-state-hook' allow the definition of prefix
+commands other than the predefined `C-u'.
 
 ** New functions `filepos-to-bufferpos' and `bufferpos-to-filepos'.