summaryrefslogtreecommitdiff
path: root/src/lread.c
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-01-24 18:17:10 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2022-01-24 18:19:38 +0100
commit701ec0bda2b15fc97af6ca68fb842fb1ec9aac35 (patch)
treec0f9133d07123c700707ac46ac0fa5fec5eb65a7 /src/lread.c
parent7e653ee73f98ab2ad2061f211d3d57be805d7231 (diff)
downloademacs-701ec0bda2b15fc97af6ca68fb842fb1ec9aac35.tar.gz
emacs-701ec0bda2b15fc97af6ca68fb842fb1ec9aac35.tar.bz2
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/lread.c')
-rw-r--r--src/lread.c9
1 files changed, 7 insertions, 2 deletions
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,
/* Read until we get an acceptable event. */
retry:
do
- val = read_char (0, Qnil, (input_method ? Qnil : Qt), 0,
- NUMBERP (seconds) ? &end_time : NULL);
+ {
+ ptrdiff_t count = SPECPDL_INDEX ();
+ specbind (Qecho_keystrokes, Qnil);
+ val = read_char (0, Qnil, (input_method ? Qnil : Qt), 0,
+ NUMBERP (seconds) ? &end_time : NULL);
+ unbind_to (count, Qnil);
+ }
while (FIXNUMP (val) && XFIXNUM (val) == -2); /* wrong_kboard_jmpbuf */
if (BUFFERP (val))