Use isearch-tmm-menubar when tmm-menubar is called in isearch-mode (bug#43966)
* lisp/isearch.el (isearch-menu-bar-commands): Add tmm-menubar to defaults. (isearch-mode-map): Remove remapping of tmm-menubar to isearch-tmm-menubar. * lisp/tmm.el (tmm-menubar): Call isearch-tmm-menubar in isearch-mode.
This commit is contained in:
parent
50c7de093a
commit
c8c4d65d65
2 changed files with 9 additions and 8 deletions
|
@ -513,7 +513,7 @@ This is like `describe-bindings', but displays only Isearch keys."
|
|||
(call-interactively command)))
|
||||
|
||||
(defvar isearch-menu-bar-commands
|
||||
'(isearch-tmm-menubar menu-bar-open mouse-minor-mode-menu)
|
||||
'(isearch-tmm-menubar tmm-menubar menu-bar-open mouse-minor-mode-menu)
|
||||
"List of commands that can open a menu during Isearch.")
|
||||
|
||||
(defvar isearch-menu-bar-yank-map
|
||||
|
@ -787,7 +787,6 @@ This is like `describe-bindings', but displays only Isearch keys."
|
|||
|
||||
(define-key map [menu-bar search-menu]
|
||||
(list 'menu-item "Isearch" isearch-menu-bar-map))
|
||||
(define-key map [remap tmm-menubar] 'isearch-tmm-menubar)
|
||||
|
||||
map)
|
||||
"Keymap for `isearch-mode'.")
|
||||
|
|
14
lisp/tmm.el
14
lisp/tmm.el
|
@ -56,12 +56,14 @@ to invoke `tmm-menubar' instead, customize the variable
|
|||
`tty-menu-open-use-tmm' to a non-nil value."
|
||||
(interactive)
|
||||
(run-hooks 'menu-bar-update-hook)
|
||||
(let ((menu-bar (menu-bar-keymap))
|
||||
(menu-bar-item-cons (and x-position
|
||||
(menu-bar-item-at-x x-position))))
|
||||
(tmm-prompt menu-bar
|
||||
nil
|
||||
(and menu-bar-item-cons (car menu-bar-item-cons)))))
|
||||
(if isearch-mode
|
||||
(isearch-tmm-menubar)
|
||||
(let ((menu-bar (menu-bar-keymap))
|
||||
(menu-bar-item-cons (and x-position
|
||||
(menu-bar-item-at-x x-position))))
|
||||
(tmm-prompt menu-bar
|
||||
nil
|
||||
(and menu-bar-item-cons (car menu-bar-item-cons))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun tmm-menubar-mouse (event)
|
||||
|
|
Loading…
Add table
Reference in a new issue