[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-28 492b927: Fix help commands for menu-bar menus
From: |
Eli Zaretskii |
Subject: |
emacs-28 492b927: Fix help commands for menu-bar menus |
Date: |
Wed, 27 Oct 2021 09:10:57 -0400 (EDT) |
branch: emacs-28
commit 492b92790951a50c7a67ae7d112fae9dfa9f3e86
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Fix help commands for menu-bar menus
* lisp/help.el (help--analyze-key): Fix "C-h c" and "C-h k" on
menu-bar menu items. (Bug#51421)
---
lisp/help.el | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lisp/help.el b/lisp/help.el
index 92e22ae..d22f50d 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -701,7 +701,13 @@ in the selected window."
;; is selected from the context menu that should describe KEY
;; at the position of mouse click that opened the context menu.
;; When no mouse was involved, don't use `mouse-set-point'.
- (defn (if buffer (key-binding key t)
+ (defn (if (or buffer
+ ;; Clicks on the menu bar produce "event" that
+ ;; is just '(menu-bar)', for which
+ ;; `mouse-set-point' is not useful.
+ (and (not (windowp (posn-window (event-start event))))
+ (not (framep (posn-window (event-start event))))))
+ (key-binding key t)
(save-excursion (mouse-set-point event) (key-binding key
t)))))
;; Handle the case where we faked an entry in "Select and Paste" menu.
(when (and (eq defn nil)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-28 492b927: Fix help commands for menu-bar menus,
Eli Zaretskii <=