diff options
| author | Eli Zaretskii | 2016-01-13 19:38:06 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2016-01-13 19:38:06 +0200 |
| commit | d3776e9f7c9e6ae3ac4c5afff0c33bff73665759 (patch) | |
| tree | 71384adcc6713afe3164f2d25143b66271b2f142 | |
| parent | d022b707d654c24171a3baf951ca8e5e13a0b77a (diff) | |
| download | emacs-d3776e9f7c9e6ae3ac4c5afff0c33bff73665759.tar.gz 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'.
| -rw-r--r-- | doc/lispref/hooks.texi | 16 | ||||
| -rw-r--r-- | etc/NEWS | 7 |
2 files changed, 20 insertions, 3 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. | |||
| 190 | @item post-self-insert-hook | 190 | @item post-self-insert-hook |
| 191 | @xref{Keymaps and Minor Modes}. | 191 | @xref{Keymaps and Minor Modes}. |
| 192 | 192 | ||
| 193 | @item prefix-command-echo-keystrokes-functions | ||
| 194 | @vindex prefix-command-echo-keystrokes-functions | ||
| 195 | An abnormal hook run by prefix commands (such as @kbd{C-u}) which | ||
| 196 | should return a string describing the current prefix state. For | ||
| 197 | example, @kbd{C-u} produces @samp{C-u-} and @samp{C-u 1 2 3-}. Each | ||
| 198 | hook function is called with no arguments and should return a string | ||
| 199 | describing the current prefix state, or @code{nil} if there's no | ||
| 200 | prefix state. @xref{Prefix Command Arguments}. | ||
| 201 | |||
| 202 | @item prefix-command-preserve-state-hook | ||
| 203 | @vindex prefix-command-preserve-state-hook | ||
| 204 | Hook run when a prefix command needs to preserve the prefix by passing | ||
| 205 | the current prefix command state to the next command. For example, | ||
| 206 | @kbd{C-u} needs to pass the state to the next command when the user | ||
| 207 | types @kbd{C-u -} or follows @kbd{C-u} with a digit. | ||
| 208 | |||
| 193 | @ignore | 209 | @ignore |
| 194 | @item prog-mode-hook | 210 | @item prog-mode-hook |
| 195 | @itemx special-mode-hook | 211 | @itemx special-mode-hook |
| @@ -1335,9 +1335,10 @@ that happen, `unhandled-file-name-directory' now defaults to calling | |||
| 1335 | ** syntax-propertize is now automatically called on-demand during forward | 1335 | ** syntax-propertize is now automatically called on-demand during forward |
| 1336 | parsing functions like `forward-sexp'. | 1336 | parsing functions like `forward-sexp'. |
| 1337 | 1337 | ||
| 1338 | ** New hooks prefix-command-echo-keystrokes-functions and | 1338 | +++ |
| 1339 | prefix-command-preserve-state-hook, to allow the definition of prefix | 1339 | ** New hooks `prefix-command-echo-keystrokes-functions' and |
| 1340 | commands other than the predefined C-u. | 1340 | `prefix-command-preserve-state-hook' allow the definition of prefix |
| 1341 | commands other than the predefined `C-u'. | ||
| 1341 | 1342 | ||
| 1342 | ** New functions `filepos-to-bufferpos' and `bufferpos-to-filepos'. | 1343 | ** New functions `filepos-to-bufferpos' and `bufferpos-to-filepos'. |
| 1343 | 1344 | ||