[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 3d0f5bc219: * lisp/mouse.el (context-menu-entry): Don't create me
From: |
Juri Linkov |
Subject: |
master 3d0f5bc219: * lisp/mouse.el (context-menu-entry): Don't create menu for Help commands. |
Date: |
Thu, 17 Feb 2022 13:29:38 -0500 (EST) |
branch: master
commit 3d0f5bc219de43ebd1789882bad483720d581a4e
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>
* lisp/mouse.el (context-menu-entry): Don't create menu for Help commands.
Help commands that describe keybindings call context-menu-entry bound to
a key. This causes too much trouble when trying to build the context menu
in a temporary Help buffer that is not displayed in a window.
OTOH, there is no information in context menus useful for Help commands.
So `help-buffer-under-preparation' is added to filter out such calls.
(bug#53910)
---
lisp/mouse.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 1e205283de..da2ca1c036 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -541,7 +541,9 @@ Some context functions add menu items below the separator."
(defvar context-menu-entry
`(menu-item ,(purecopy "Context Menu") ,(make-sparse-keymap)
- :filter ,(lambda (_) (context-menu-map)))
+ :filter ,(lambda (_) (unless help-buffer-under-preparation
+ ;; No need to build menu to describe keys
+ (context-menu-map))))
"Menu item that creates the context menu and can be bound to a mouse key.")
(defvar context-menu-mode-map
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 3d0f5bc219: * lisp/mouse.el (context-menu-entry): Don't create menu for Help commands.,
Juri Linkov <=