summaryrefslogtreecommitdiff
path: root/lisp/help.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2021-10-27 07:59:28 -0700
committerGlenn Morris <rgm@gnu.org>2021-10-27 07:59:28 -0700
commitedcf9edc8c038dc501c9e7f30b41a4fa776d0503 (patch)
tree0945caf25b3ec6669ad0e7263d763352671a8dfc /lisp/help.el
parent7c6f7dc99bc036639bd1b64b412e8c3d3e0c044c (diff)
parent2bdd5732aaef336681476d83bb87d76f6750d34d (diff)
downloademacs-edcf9edc8c038dc501c9e7f30b41a4fa776d0503.tar.gz
Merge from origin/emacs-28
2bdd5732aa (origin/emacs-28) ; * etc/NEWS: Fix last change. 492b927909 Fix help commands for menu-bar menus 9589be772d ; * etc/NEWS: Fix typos. d353fc4a00 ; Explain why "kinds of atom" isn't a typo 47a3750162 ; * etc/NEWS: Improve wording of the Emoji entry. b814712796 ; Checkdoc fixes in image-dired.el e45b3fc521 Improve function documentation with text from XDG BDS spec 284c77eeb6 * lisp/transient.el: Update to package version 0.3.7. 40400e6977 ; Revert parts of "Use string-replace instead of replace-r... 214c2e268c ; Revert parts of "Use string-search instead of string-mat... # Conflicts: # etc/NEWS
Diffstat (limited to 'lisp/help.el')
-rw-r--r--lisp/help.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/help.el b/lisp/help.el
index 510dee7f7ad..deeb892280f 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)