diff options
| author | Eli Zaretskii | 2012-07-21 17:48:17 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2012-07-21 17:48:17 +0300 |
| commit | 1ada2e55c700e8971a759241c0935060542c8179 (patch) | |
| tree | 4eaaf2960e46a3e2d3a5f1216be56e6c5c317d29 | |
| parent | 07fb592eadf294f0cc97ebf4de0afd4b02815faf (diff) | |
| download | emacs-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/ChangeLog | 7 | ||||
| -rw-r--r-- | doc/lispref/commands.texi | 28 | ||||
| -rw-r--r-- | doc/lispref/keymaps.texi | 10 |
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 @@ | |||
| 1 | 2012-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 | |||
| 1 | 2012-07-17 Chong Yidong <cyd@gnu.org> | 8 | 2012-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}). | |||
| 379 | Existing, Completion, Default, Prompt. | 379 | Existing, Completion, Default, Prompt. |
| 380 | 380 | ||
| 381 | @item e | 381 | @item e |
| 382 | The first or next mouse event in the key sequence that invoked the command. | 382 | The first or next non-keyboard event in the key sequence that invoked |
| 383 | More precisely, @samp{e} gets events that are lists, so you can look at | 383 | the command. More precisely, @samp{e} gets events that are lists, so |
| 384 | the data in the lists. @xref{Input Events}. No I/O. | 384 | you can look at the data in the lists. @xref{Input Events}. No I/O. |
| 385 | |||
| 386 | You use @samp{e} for mouse events and for special system events | ||
| 387 | (@pxref{Misc Events}). The event list that the command receives | ||
| 388 | depends on the event. @xref{Input Events}, which describes the forms | ||
| 389 | of the list for each event in the corresponding subsections. | ||
| 385 | 390 | ||
| 386 | You can use @samp{e} more than once in a single command's interactive | 391 | You can use @samp{e} more than once in a single command's interactive |
| 387 | specification. If the key sequence that invoked the command has | 392 | specification. 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 | ||
| 974 | The Emacs command loop reads a sequence of @dfn{input events} that | 979 | The Emacs command loop reads a sequence of @dfn{input events} that |
| 975 | represent keyboard or mouse activity. The events for keyboard activity | 980 | represent keyboard or mouse activity, or system events sent to Emacs. |
| 976 | are characters or symbols; mouse events are always lists. This section | 981 | The events for keyboard activity are characters or symbols; other |
| 977 | describes the representation and meaning of input events in detail. | 982 | events are always lists. This section describes the representation |
| 983 | and meaning of input events in detail. | ||
| 978 | 984 | ||
| 979 | @defun eventp object | 985 | @defun eventp object |
| 980 | This function returns non-@code{nil} if @var{object} is an input event | 986 | This 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 | |||
| 2840 | definition to find the actual event. | 2846 | definition 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 | 2850 | user signals like @code{sigusr1} are normally handled in this way. |
| 2845 | defines how to handle special events---and which events are | 2851 | The keymap which defines how to handle special events---and which |
| 2846 | special---is in the variable @code{special-event-map} (@pxref{Active | 2852 | events are special---is in the variable @code{special-event-map} |
| 2847 | Keymaps}). | 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 |
| 47 | or more input events that form a unit. Input events include | 47 | or more input events that form a unit. Input events include |
| 48 | characters, function keys, and mouse actions (@pxref{Input Events}). | 48 | characters, function keys, mouse actions, or system events external to |
| 49 | Emacs, such as @code{iconify-frame} (@pxref{Input Events}). | ||
| 49 | The Emacs Lisp representation for a key sequence is a string or | 50 | The Emacs Lisp representation for a key sequence is a string or |
| 50 | vector. Unless otherwise stated, any Emacs Lisp function that accepts | 51 | vector. Unless otherwise stated, any Emacs Lisp function that accepts |
| 51 | a key sequence as an argument can handle both representations. | 52 | a key sequence as an argument can handle both representations. |
| @@ -62,9 +63,10 @@ sequence is the concatenation of the string representations of the | |||
| 62 | constituent events; thus, @code{"\C-xl"} represents the key sequence | 63 | constituent 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 |
| 66 | non-@acronym{ASCII} characters such as @kbd{C-=} or @kbd{H-a} cannot be | 67 | events, or non-@acronym{ASCII} characters such as @kbd{C-=} or |
| 67 | represented as strings; they have to be represented as vectors. | 68 | @kbd{H-a} cannot be represented as strings; they have to be |
| 69 | represented 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 |
| 70 | an input event, in its Lisp form. @xref{Input Events}. For example, | 72 | an input event, in its Lisp form. @xref{Input Events}. For example, |