diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2020-10-07 06:09:18 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2020-10-07 06:09:18 +0200 |
commit | 5bc2f37dfbc3751e0b265b911aff3cf723ac4072 (patch) | |
tree | 157c58673e7ae52081037d0f97ba8da3ebe7b306 | |
parent | 0ab67a65f58e767f73a55f28e37b1a80bfc36682 (diff) | |
download | emacs-5bc2f37dfbc3751e0b265b911aff3cf723ac4072.tar.gz |
Update documentation on this-command-keys to reflect new behavior
* doc/lispref/commands.texi (Command Loop Info):
`this-command-keys' does not include the C-u any more, so remove
that from the description and the example
(bug#22107).
* src/keyboard.c (Fthis_single_command_keys): Don't say that
`this-command-keys' returns the C-u prefix (bug#22111).
-rw-r--r-- | doc/lispref/commands.texi | 7 | ||||
-rw-r--r-- | src/keyboard.c | 2 |
2 files changed, 3 insertions, 6 deletions
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index 25f657404f3..1467854904c 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi @@ -930,9 +930,8 @@ was specified to run but remapped into another command. @defun this-command-keys This function returns a string or vector containing the key sequence -that invoked the present command, plus any previous commands that -generated the prefix argument for this command. Any events read by the -command using @code{read-event} without a timeout get tacked on to the end. +that invoked the present command. Any events read by the command +using @code{read-event} without a timeout get tacked on to the end. However, if the command has called @code{read-key-sequence}, it returns the last read key sequence. @xref{Key Sequence Input}. The @@ -943,7 +942,7 @@ fit in a string. @xref{Input Events}. @group (this-command-keys) ;; @r{Now use @kbd{C-u C-x C-e} to evaluate that.} - @result{} "^U^X^E" + @result{} "^X^E" @end group @end example @end defun diff --git a/src/keyboard.c b/src/keyboard.c index bd1cdfa15bc..4d22c44810e 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -10566,8 +10566,6 @@ DEFUN ("this-single-command-keys", Fthis_single_command_keys, doc: /* Return the key sequence that invoked this command. More generally, it returns the last key sequence read, either by the command loop or by `read-key-sequence'. -Unlike `this-command-keys', this function's value -does not include prefix arguments. The value is always a vector. */) (void) { |