aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2012-07-21 17:48:17 +0300
committerEli Zaretskii2012-07-21 17:48:17 +0300
commit1ada2e55c700e8971a759241c0935060542c8179 (patch)
tree4eaaf2960e46a3e2d3a5f1216be56e6c5c317d29
parent07fb592eadf294f0cc97ebf4de0afd4b02815faf (diff)
downloademacs-1ada2e55c700e8971a759241c0935060542c8179.tar.gz
emacs-1ada2e55c700e8971a759241c0935060542c8179.zip
Improve documentation of special events and of the "e" interactive spec.
doc/lispref/commands.texi (Special Events): Mention language-change event. (Input Events, Interactive Codes): doc/lispref/keymaps.texi (Key Sequences): Mention events that are non-keyboard but also non-mouse events.
-rw-r--r--doc/lispref/ChangeLog7
-rw-r--r--doc/lispref/commands.texi28
-rw-r--r--doc/lispref/keymaps.texi10
3 files changed, 30 insertions, 15 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index bc01d64c509..addf622d21d 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,10 @@
12012-07-21 Eli Zaretskii <eliz@gnu.org>
2
3 * commands.texi (Special Events): Mention language-change event.
4 (Input Events, Interactive Codes):
5 * keymaps.texi (Key Sequences): Mention events that are
6 non-keyboard but also non-mouse events.
7
12012-07-17 Chong Yidong <cyd@gnu.org> 82012-07-17 Chong Yidong <cyd@gnu.org>
2 9
3 * text.texi (Insertion): Document insert-char changes. 10 * text.texi (Insertion): Document insert-char changes.
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi
index a5fb4638c9d..7e24de94fbe 100644
--- a/doc/lispref/commands.texi
+++ b/doc/lispref/commands.texi
@@ -379,9 +379,14 @@ current buffer, @code{default-directory} (@pxref{File Name Expansion}).
379Existing, Completion, Default, Prompt. 379Existing, Completion, Default, Prompt.
380 380
381@item e 381@item e
382The first or next mouse event in the key sequence that invoked the command. 382The first or next non-keyboard event in the key sequence that invoked
383More precisely, @samp{e} gets events that are lists, so you can look at 383the command. More precisely, @samp{e} gets events that are lists, so
384the data in the lists. @xref{Input Events}. No I/O. 384you can look at the data in the lists. @xref{Input Events}. No I/O.
385
386You use @samp{e} for mouse events and for special system events
387(@pxref{Misc Events}). The event list that the command receives
388depends on the event. @xref{Input Events}, which describes the forms
389of the list for each event in the corresponding subsections.
385 390
386You can use @samp{e} more than once in a single command's interactive 391You can use @samp{e} more than once in a single command's interactive
387specification. If the key sequence that invoked the command has 392specification. If the key sequence that invoked the command has
@@ -972,9 +977,10 @@ moving point out of these sequences is completely turned off.
972@cindex input events 977@cindex input events
973 978
974The Emacs command loop reads a sequence of @dfn{input events} that 979The Emacs command loop reads a sequence of @dfn{input events} that
975represent keyboard or mouse activity. The events for keyboard activity 980represent keyboard or mouse activity, or system events sent to Emacs.
976are characters or symbols; mouse events are always lists. This section 981The events for keyboard activity are characters or symbols; other
977describes the representation and meaning of input events in detail. 982events are always lists. This section describes the representation
983and meaning of input events in detail.
978 984
979@defun eventp object 985@defun eventp object
980This function returns non-@code{nil} if @var{object} is an input event 986This function returns non-@code{nil} if @var{object} is an input event
@@ -2840,11 +2846,11 @@ immediately after they are read, and this is the way for the event's
2840definition to find the actual event. 2846definition to find the actual event.
2841 2847
2842 The events types @code{iconify-frame}, @code{make-frame-visible}, 2848 The events types @code{iconify-frame}, @code{make-frame-visible},
2843@code{delete-frame}, @code{drag-n-drop}, and user signals like 2849@code{delete-frame}, @code{drag-n-drop}, @code{language-change}, and
2844@code{sigusr1} are normally handled in this way. The keymap which 2850user signals like @code{sigusr1} are normally handled in this way.
2845defines how to handle special events---and which events are 2851The keymap which defines how to handle special events---and which
2846special---is in the variable @code{special-event-map} (@pxref{Active 2852events are special---is in the variable @code{special-event-map}
2847Keymaps}). 2853(@pxref{Active Keymaps}).
2848 2854
2849@node Waiting 2855@node Waiting
2850@section Waiting for Elapsed Time or Input 2856@section Waiting for Elapsed Time or Input
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi
index ac3d9e47580..ad7092a9ed7 100644
--- a/doc/lispref/keymaps.texi
+++ b/doc/lispref/keymaps.texi
@@ -45,7 +45,8 @@ is found. The whole process is called @dfn{key lookup}.
45 45
46 A @dfn{key sequence}, or @dfn{key} for short, is a sequence of one 46 A @dfn{key sequence}, or @dfn{key} for short, is a sequence of one
47or more input events that form a unit. Input events include 47or more input events that form a unit. Input events include
48characters, function keys, and mouse actions (@pxref{Input Events}). 48characters, function keys, mouse actions, or system events external to
49Emacs, such as @code{iconify-frame} (@pxref{Input Events}).
49The Emacs Lisp representation for a key sequence is a string or 50The Emacs Lisp representation for a key sequence is a string or
50vector. Unless otherwise stated, any Emacs Lisp function that accepts 51vector. Unless otherwise stated, any Emacs Lisp function that accepts
51a key sequence as an argument can handle both representations. 52a key sequence as an argument can handle both representations.
@@ -62,9 +63,10 @@ sequence is the concatenation of the string representations of the
62constituent events; thus, @code{"\C-xl"} represents the key sequence 63constituent events; thus, @code{"\C-xl"} represents the key sequence
63@kbd{C-x l}. 64@kbd{C-x l}.
64 65
65 Key sequences containing function keys, mouse button events, or 66 Key sequences containing function keys, mouse button events, system
66non-@acronym{ASCII} characters such as @kbd{C-=} or @kbd{H-a} cannot be 67events, or non-@acronym{ASCII} characters such as @kbd{C-=} or
67represented as strings; they have to be represented as vectors. 68@kbd{H-a} cannot be represented as strings; they have to be
69represented as vectors.
68 70
69 In the vector representation, each element of the vector represents 71 In the vector representation, each element of the vector represents
70an input event, in its Lisp form. @xref{Input Events}. For example, 72an input event, in its Lisp form. @xref{Input Events}. For example,