Commit 9d2b8e76 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

Fix 'this-command-keys' wrt prefix argument

* src/keyboard.c (command_loop_1): Restore the feature whereby C-u
was part of this-command-keys, but not of this-single-command-keys.

* lisp/simple.el (internal-echo-keystrokes-prefix): Add
commentary about the function's return value.
parent 5aaa636b
......@@ -3818,7 +3818,9 @@ see other processes running on the system, use `list-system-processes'."
(setq prefix-command--last-echo nil)
(defun internal-echo-keystrokes-prefix ()
;; BEWARE: Called directly from the C code.
;; BEWARE: Called directly from C code.
;; If the return value is non-nil, it means we are in the middle of
;; a command with prefix, such as a command invoked with prefix-arg.
(if (not prefix-command--needs-update)
(setq prefix-command--last-echo
......@@ -1486,11 +1486,14 @@ command_loop_1 (void)
if (!CONSP (last_command_event))
kset_last_repeatable_command (current_kboard, Vreal_this_command);
this_command_key_count = 0;
this_single_command_key_start = 0;
if (current_kboard->immediate_echo
&& !NILP (call0 (Qinternal_echo_keystrokes_prefix)))
/* Don't reset this_command_key_count if we've processed
prefix-arg. */
if (NILP (call0 (Qinternal_echo_keystrokes_prefix)))
this_command_key_count = 0;
this_single_command_key_start = 0;
else if (current_kboard->immediate_echo)
current_kboard->immediate_echo = false;
/* Refresh the echo message. */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment