aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2015-12-11 11:53:53 +0200
committerEli Zaretskii2015-12-11 11:53:53 +0200
commit9d2b8e768f2015a89f7609dedf7b28ea5e8123b5 (patch)
tree187a470771f9d31e2d8e8685d2a94f3c4f16cd0a
parent5aaa636b7bc5fbc7cb946a5f8cb3f9dd3604159d (diff)
downloademacs-9d2b8e768f2015a89f7609dedf7b28ea5e8123b5.tar.gz
emacs-9d2b8e768f2015a89f7609dedf7b28ea5e8123b5.zip
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. (Bug#22107) * lisp/simple.el (internal-echo-keystrokes-prefix): Add commentary about the function's return value.
-rw-r--r--lisp/simple.el4
-rw-r--r--src/keyboard.c13
2 files changed, 11 insertions, 6 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 17b9c918ead..9e0388efe45 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3818,7 +3818,9 @@ see other processes running on the system, use `list-system-processes'."
3818(setq prefix-command--last-echo nil) 3818(setq prefix-command--last-echo nil)
3819 3819
3820(defun internal-echo-keystrokes-prefix () 3820(defun internal-echo-keystrokes-prefix ()
3821 ;; BEWARE: Called directly from the C code. 3821 ;; BEWARE: Called directly from C code.
3822 ;; If the return value is non-nil, it means we are in the middle of
3823 ;; a command with prefix, such as a command invoked with prefix-arg.
3822 (if (not prefix-command--needs-update) 3824 (if (not prefix-command--needs-update)
3823 prefix-command--last-echo 3825 prefix-command--last-echo
3824 (setq prefix-command--last-echo 3826 (setq prefix-command--last-echo
diff --git a/src/keyboard.c b/src/keyboard.c
index 02bc7d2a0b7..928d8496cdb 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1486,11 +1486,14 @@ command_loop_1 (void)
1486 if (!CONSP (last_command_event)) 1486 if (!CONSP (last_command_event))
1487 kset_last_repeatable_command (current_kboard, Vreal_this_command); 1487 kset_last_repeatable_command (current_kboard, Vreal_this_command);
1488 1488
1489 this_command_key_count = 0; 1489 /* Don't reset this_command_key_count if we've processed
1490 this_single_command_key_start = 0; 1490 prefix-arg. */
1491 1491 if (NILP (call0 (Qinternal_echo_keystrokes_prefix)))
1492 if (current_kboard->immediate_echo 1492 {
1493 && !NILP (call0 (Qinternal_echo_keystrokes_prefix))) 1493 this_command_key_count = 0;
1494 this_single_command_key_start = 0;
1495 }
1496 else if (current_kboard->immediate_echo)
1494 { 1497 {
1495 current_kboard->immediate_echo = false; 1498 current_kboard->immediate_echo = false;
1496 /* Refresh the echo message. */ 1499 /* Refresh the echo message. */