diff options
| author | Basil L. Contovounesios | 2019-04-21 23:02:01 +0100 |
|---|---|---|
| committer | Basil L. Contovounesios | 2019-05-07 18:00:20 +0100 |
| commit | c972da907d494b6d5efd423aa3b5d0b23f7b7801 (patch) | |
| tree | fd5dd346e8e31e029bf3c8686f28c60e6dadf4c4 /doc | |
| parent | e10d08df7edbb2e9e90169d19c3361099802fad6 (diff) | |
| download | emacs-c972da907d494b6d5efd423aa3b5d0b23f7b7801.tar.gz emacs-c972da907d494b6d5efd423aa3b5d0b23f7b7801.zip | |
Clarify what constitutes an event (bug#35238)
* doc/lispref/commands.texi (Input Events): Specify that events are
non-nil and remove vestiges of bug#10190.
* doc/lispref/os.texi (Recording Input): Document optional argument
of recent-keys.
* lisp/subr.el (eventp): Check that the car of conses is non-nil.
* etc/NEWS: Announce it as an incompatible change.
* src/keyboard.c (Frecent_keys): Clarify that returned "events" are
not real events.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/commands.texi | 9 | ||||
| -rw-r--r-- | doc/lispref/os.texi | 7 |
2 files changed, 9 insertions, 7 deletions
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index cd44c1c87ef..5ea0be2667b 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi | |||
| @@ -1047,12 +1047,9 @@ and meaning of input events in detail. | |||
| 1047 | This function returns non-@code{nil} if @var{object} is an input event | 1047 | This function returns non-@code{nil} if @var{object} is an input event |
| 1048 | or event type. | 1048 | or event type. |
| 1049 | 1049 | ||
| 1050 | Note that any symbol might be used as an event or an event type. | 1050 | Note that any non-@code{nil} symbol might be used as an event or an |
| 1051 | @code{eventp} cannot distinguish whether a symbol is intended by Lisp | 1051 | event type; @code{eventp} cannot distinguish whether a symbol is |
| 1052 | code to be used as an event. Instead, it distinguishes whether the | 1052 | intended by Lisp code to be used as an event. |
| 1053 | symbol has actually been used in an event that has been read as input in | ||
| 1054 | the current Emacs session. If a symbol has not yet been so used, | ||
| 1055 | @code{eventp} returns @code{nil}. | ||
| 1056 | @end defun | 1053 | @end defun |
| 1057 | 1054 | ||
| 1058 | @menu | 1055 | @menu |
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 59cd5a8fe8a..fef954eb7a3 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi | |||
| @@ -2197,7 +2197,7 @@ is the character Emacs currently uses for quitting, usually @kbd{C-g}. | |||
| 2197 | @subsection Recording Input | 2197 | @subsection Recording Input |
| 2198 | @cindex recording input | 2198 | @cindex recording input |
| 2199 | 2199 | ||
| 2200 | @defun recent-keys | 2200 | @defun recent-keys &optional include-cmds |
| 2201 | This function returns a vector containing the last 300 input events from | 2201 | This function returns a vector containing the last 300 input events from |
| 2202 | the keyboard or mouse. All input events are included, whether or not | 2202 | the keyboard or mouse. All input events are included, whether or not |
| 2203 | they were used as parts of key sequences. Thus, you always get the last | 2203 | they were used as parts of key sequences. Thus, you always get the last |
| @@ -2205,6 +2205,11 @@ they were used as parts of key sequences. Thus, you always get the last | |||
| 2205 | (These are excluded because they are less interesting for debugging; it | 2205 | (These are excluded because they are less interesting for debugging; it |
| 2206 | should be enough to see the events that invoked the macros.) | 2206 | should be enough to see the events that invoked the macros.) |
| 2207 | 2207 | ||
| 2208 | If @var{include-cmds} is non-@code{nil}, complete key sequences in the | ||
| 2209 | result vector are interleaved with pseudo-events of the form | ||
| 2210 | @code{(nil . @var{COMMAND})}, where @var{COMMAND} is the binding of | ||
| 2211 | the key sequence (@pxref{Command Overview}). | ||
| 2212 | |||
| 2208 | A call to @code{clear-this-command-keys} (@pxref{Command Loop Info}) | 2213 | A call to @code{clear-this-command-keys} (@pxref{Command Loop Info}) |
| 2209 | causes this function to return an empty vector immediately afterward. | 2214 | causes this function to return an empty vector immediately afterward. |
| 2210 | @end defun | 2215 | @end defun |