From: Po Lu Date: Thu, 8 Feb 2024 02:32:28 +0000 (+0800) Subject: Prevent echo area help message from being printed repeatedly X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=311152f60b3dacdbf0a900b65ba957cf25657c34;p=emacs.git Prevent echo area help message from being printed repeatedly * src/keyboard.c (echo_dash): Detect echo_keystrokes_help messages and return if they be present. (cherry picked from commit ed2450e79b597e0306f14b542e934a90dfd9786f) --- diff --git a/src/keyboard.c b/src/keyboard.c index cd6ccbd77d0..78ea1893ba1 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -580,7 +580,10 @@ echo_dash (void) idx = make_fixnum (SCHARS (KVAR (current_kboard, echo_string)) - 1); last_char = Faref (KVAR (current_kboard, echo_string), idx); - if (XFIXNUM (last_char) == '-' && XFIXNUM (prev_char) != ' ') + if ((XFIXNUM (last_char) == '-' && XFIXNUM (prev_char) != ' ') + /* Or a keystroke help message. */ + || (echo_keystrokes_help + && XFIXNUM (last_char) == ')' && XFIXNUM (prev_char) == 'p')) return; }