From 8fe0aff7e65fd2a4525c459aef2f187ea40980fb Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sat, 22 Feb 2025 14:57:25 -0500 Subject: [PATCH] (help--append-keystrokes-help): Fix bug#76341 * lisp/help.el (help--append-keystrokes-help): Silence the help message when there is no help key. (cherry picked from commit c830caab2c5bd3d03673c26f053397042dc58ad3) --- lisp/help.el | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/lisp/help.el b/lisp/help.el index b4430a813ec..75803afdfd4 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -2344,18 +2344,17 @@ The `temp-buffer-window-setup-hook' hook is called." (current-active-maps t))))) (catch 'res (dolist (val help-event-list) - (let ((key (vector (if (eql val 'help) - help-char - val)))) - (unless (seq-find (lambda (map) (and (keymapp map) (lookup-key map key))) - bindings) - (throw 'res - (concat - str - (substitute-command-keys - (format - " (\\`%s' for help)" - (key-description key)))))))) + (when (setq val (if (eql val 'help) help-char val)) + (let ((key (vector val))) + (unless (seq-find (lambda (map) (and (keymapp map) (lookup-key map key))) + bindings) + (throw 'res + (concat + str + (substitute-command-keys + (format + " (\\`%s' for help)" + (key-description key))))))))) str))) -- 2.39.5