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)
(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