aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Ingebrigtsen2022-01-24 18:17:10 +0100
committerLars Ingebrigtsen2022-01-24 18:19:38 +0100
commit701ec0bda2b15fc97af6ca68fb842fb1ec9aac35 (patch)
treec0f9133d07123c700707ac46ac0fa5fec5eb65a7 /src
parent7e653ee73f98ab2ad2061f211d3d57be805d7231 (diff)
downloademacs-701ec0bda2b15fc97af6ca68fb842fb1ec9aac35.tar.gz
emacs-701ec0bda2b15fc97af6ca68fb842fb1ec9aac35.zip
Don't output spurious prefixes in read-char-exclusive
* src/keyboard.c (read_char): Don't touch the echo area if Vecho_keystrokes is nil. * src/lread.c (read_filtered_event): Bind echo_keystrokes to nil to avoid outputting prefixes we're not going to act on anyway (bug#19718).
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c13
-rw-r--r--src/lread.c9
2 files changed, 14 insertions, 8 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 441c23e10c7..9242e8dc624 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -3059,12 +3059,13 @@ read_char (int commandflag, Lisp_Object map,
3059 3059
3060 /* Now wipe the echo area, except for help events which do their 3060 /* Now wipe the echo area, except for help events which do their
3061 own stuff with the echo area. */ 3061 own stuff with the echo area. */
3062 if (!CONSP (c) 3062 if (!NILP (Vecho_keystrokes)
3063 || (!(EQ (Qhelp_echo, XCAR (c))) 3063 && (!CONSP (c)
3064 && !(EQ (Qswitch_frame, XCAR (c))) 3064 || (!(EQ (Qhelp_echo, XCAR (c)))
3065 /* Don't wipe echo area for select window events: These might 3065 && !(EQ (Qswitch_frame, XCAR (c)))
3066 get delayed via `mouse-autoselect-window' (Bug#11304). */ 3066 /* Don't wipe echo area for select window events: These might
3067 && !(EQ (Qselect_window, XCAR (c))))) 3067 get delayed via `mouse-autoselect-window' (Bug#11304). */
3068 && !(EQ (Qselect_window, XCAR (c))))))
3068 { 3069 {
3069 if (!NILP (echo_area_buffer[0])) 3070 if (!NILP (echo_area_buffer[0]))
3070 { 3071 {
diff --git a/src/lread.c b/src/lread.c
index 9910db27de7..ec54d2d81ad 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -705,8 +705,13 @@ read_filtered_event (bool no_switch_frame, bool ascii_required,
705 /* Read until we get an acceptable event. */ 705 /* Read until we get an acceptable event. */
706 retry: 706 retry:
707 do 707 do
708 val = read_char (0, Qnil, (input_method ? Qnil : Qt), 0, 708 {
709 NUMBERP (seconds) ? &end_time : NULL); 709 ptrdiff_t count = SPECPDL_INDEX ();
710 specbind (Qecho_keystrokes, Qnil);
711 val = read_char (0, Qnil, (input_method ? Qnil : Qt), 0,
712 NUMBERP (seconds) ? &end_time : NULL);
713 unbind_to (count, Qnil);
714 }
710 while (FIXNUMP (val) && XFIXNUM (val) == -2); /* wrong_kboard_jmpbuf */ 715 while (FIXNUMP (val) && XFIXNUM (val) == -2); /* wrong_kboard_jmpbuf */
711 716
712 if (BUFFERP (val)) 717 if (BUFFERP (val))