diff options
| author | Phillip Lord | 2019-01-25 08:59:06 +0000 |
|---|---|---|
| committer | Phillip Lord | 2019-01-25 08:59:06 +0000 |
| commit | 27fffb2701c38090916e077d28a4a6b9e2bc09d2 (patch) | |
| tree | fc35dc8b0596a90cc7b3be0b24d1d62c7c2fd01a | |
| parent | f52de87166062934735db995d45c1bcb07faaf7f (diff) | |
| download | emacs-27fffb2701c38090916e077d28a4a6b9e2bc09d2.tar.gz emacs-27fffb2701c38090916e077d28a4a6b9e2bc09d2.zip | |
; Document input-event-functions
| -rw-r--r-- | doc/lispref/commands.texi | 14 | ||||
| -rw-r--r-- | etc/NEWS | 1 |
2 files changed, 14 insertions, 1 deletions
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index 1eb580e1e0f..fb5a827ad12 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi | |||
| @@ -256,7 +256,7 @@ It may be a Lisp expression that is not a string; then it should be a | |||
| 256 | form that is evaluated to get a list of arguments to pass to the | 256 | form that is evaluated to get a list of arguments to pass to the |
| 257 | command. Usually this form will call various functions to read input | 257 | command. Usually this form will call various functions to read input |
| 258 | from the user, most often through the minibuffer (@pxref{Minibuffers}) | 258 | from the user, most often through the minibuffer (@pxref{Minibuffers}) |
| 259 | or directly from the keyboard (@pxref{Reading Input}). | 259 | or directly from the keyboard (@pxref{Reading Input}) |
| 260 | 260 | ||
| 261 | Providing point or the mark as an argument value is also common, but | 261 | Providing point or the mark as an argument value is also common, but |
| 262 | if you do this @emph{and} read input (whether using the minibuffer or | 262 | if you do this @emph{and} read input (whether using the minibuffer or |
| @@ -2920,6 +2920,18 @@ this expression) remains the value of @code{last-command-event}. | |||
| 2920 | @end example | 2920 | @end example |
| 2921 | @end defvar | 2921 | @end defvar |
| 2922 | 2922 | ||
| 2923 | @defvar input-event-functions | ||
| 2924 | This variable holds a list of functions to call after Emacs reads an | ||
| 2925 | event, but before any commands are run. Each function recieves a | ||
| 2926 | single argument: the event that has been read. | ||
| 2927 | |||
| 2928 | There are normally easier hooks to use than this; in particular | ||
| 2929 | @var{pre-command-hook} is run immediately before any command resulting | ||
| 2930 | from an event. However, not all events result in a command, including | ||
| 2931 | many mouse events and some keyboard events when an input-method is | ||
| 2932 | active (@pxref{Reading Input}). | ||
| 2933 | @end defvar | ||
| 2934 | |||
| 2923 | @defmac while-no-input body@dots{} | 2935 | @defmac while-no-input body@dots{} |
| 2924 | This construct runs the @var{body} forms and returns the value of the | 2936 | This construct runs the @var{body} forms and returns the value of the |
| 2925 | last one---but only if no input arrives. If any input arrives during | 2937 | last one---but only if no input arrives. If any input arrives during |
| @@ -1204,6 +1204,7 @@ removed. | |||
| 1204 | 1204 | ||
| 1205 | ** 'lookup-key' can take a list of keymaps as argument. | 1205 | ** 'lookup-key' can take a list of keymaps as argument. |
| 1206 | 1206 | ||
| 1207 | +++ | ||
| 1207 | ** New hook 'input-event-functions' run whenever a user-input is read. | 1208 | ** New hook 'input-event-functions' run whenever a user-input is read. |
| 1208 | 1209 | ||
| 1209 | +++ | 1210 | +++ |