aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhillip Lord2019-01-25 08:59:06 +0000
committerPhillip Lord2019-01-25 08:59:06 +0000
commit27fffb2701c38090916e077d28a4a6b9e2bc09d2 (patch)
treefc35dc8b0596a90cc7b3be0b24d1d62c7c2fd01a
parentf52de87166062934735db995d45c1bcb07faaf7f (diff)
downloademacs-27fffb2701c38090916e077d28a4a6b9e2bc09d2.tar.gz
emacs-27fffb2701c38090916e077d28a4a6b9e2bc09d2.zip
; Document input-event-functions
-rw-r--r--doc/lispref/commands.texi14
-rw-r--r--etc/NEWS1
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
256form that is evaluated to get a list of arguments to pass to the 256form that is evaluated to get a list of arguments to pass to the
257command. Usually this form will call various functions to read input 257command. Usually this form will call various functions to read input
258from the user, most often through the minibuffer (@pxref{Minibuffers}) 258from the user, most often through the minibuffer (@pxref{Minibuffers})
259or directly from the keyboard (@pxref{Reading Input}). 259or directly from the keyboard (@pxref{Reading Input})
260 260
261Providing point or the mark as an argument value is also common, but 261Providing point or the mark as an argument value is also common, but
262if you do this @emph{and} read input (whether using the minibuffer or 262if 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
2924This variable holds a list of functions to call after Emacs reads an
2925event, but before any commands are run. Each function recieves a
2926single argument: the event that has been read.
2927
2928There are normally easier hooks to use than this; in particular
2929@var{pre-command-hook} is run immediately before any command resulting
2930from an event. However, not all events result in a command, including
2931many mouse events and some keyboard events when an input-method is
2932active (@pxref{Reading Input}).
2933@end defvar
2934
2923@defmac while-no-input body@dots{} 2935@defmac while-no-input body@dots{}
2924This construct runs the @var{body} forms and returns the value of the 2936This construct runs the @var{body} forms and returns the value of the
2925last one---but only if no input arrives. If any input arrives during 2937last one---but only if no input arrives. If any input arrives during
diff --git a/etc/NEWS b/etc/NEWS
index 4937fa0fe2d..c658406bc77 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -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+++