emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 d3776e9: Document the new prefix-command hooks


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-25 d3776e9: Document the new prefix-command hooks
Date: Wed, 13 Jan 2016 17:38:20 +0000

branch: emacs-25
commit d3776e9f7c9e6ae3ac4c5afff0c33bff73665759
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Document the new prefix-command hooks
    
    * doc/lispref/hooks.texi (Standard Hooks): Document
    `prefix-command-echo-keystrokes-functions' and
    `prefix-command-preserve-state-hook'.
---
 doc/lispref/hooks.texi |   16 ++++++++++++++++
 etc/NEWS               |    7 ++++---
 2 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/doc/lispref/hooks.texi b/doc/lispref/hooks.texi
index cbbaa8e..b8f761d 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}.
 
address@hidden prefix-command-echo-keystrokes-functions
address@hidden 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}.
+
address@hidden prefix-command-preserve-state-hook
address@hidden 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,
address@hidden 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
diff --git a/etc/NEWS b/etc/NEWS
index 6323b24..5a1adff 100644
--- 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'.
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]