]> git.eshelyaron.com Git - emacs.git/commitdiff
Prevent echo area help message from being printed repeatedly
authorPo Lu <luangruo@yahoo.com>
Thu, 8 Feb 2024 02:32:28 +0000 (10:32 +0800)
committerEshel Yaron <me@eshelyaron.com>
Thu, 8 Feb 2024 08:41:29 +0000 (09:41 +0100)
* src/keyboard.c (echo_dash): Detect echo_keystrokes_help
messages and return if they be present.

(cherry picked from commit ed2450e79b597e0306f14b542e934a90dfd9786f)

src/keyboard.c

index cd6ccbd77d0dbd3e90a0df1b8fba6f8f4bcc5c49..78ea1893ba10caa696fe345e17cf41b041673aa1 100644 (file)
@@ -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;
     }