From d1964f70df253ace00f9fbc038f6aacca05bd1ce Mon Sep 17 00:00:00 2001 From: Jared Finder Date: Tue, 6 Oct 2020 20:04:12 -0700 Subject: [PATCH 3/3] Enabling TTY menus with xterm-mouse-mode. --- etc/NEWS | 11 +++++++++++ lisp/menu-bar.el | 2 ++ lisp/tmm.el | 1 - 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/etc/NEWS b/etc/NEWS index 7a776b3d56..e38bd913f8 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1211,6 +1211,17 @@ never be narrower than 19 characters. When the bookmark.el library is loaded, a customize choice is added to 'tab-bar-new-tab-choice' for new tabs to show the bookmark list. +** xterm-mouse mode + +--- +*** TTY menu navigation is now supported in 'xterm-mouse-mode'. + +TTY menus support mouse navigation and selection when xterm-mouse-mode +is active. When run in a terminal, clicking on the menu bar with the +mouse now pops up a TTY menu by default instead of running the command +'tmm-menubar'. To restore the old behavior, set the variable +'tty-menu-open-use-tmm' to non-nil. + ** xwidget-webkit mode *** New xwidget commands. diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 518d0cc024..4385a09542 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -2085,6 +2085,8 @@ global-map (bindings--define-key global-map [menu-bar help-menu] (cons (purecopy "Help") menu-bar-help-menu)) +(define-key global-map [menu-bar mouse-1] 'menu-bar-open-mouse) + (defun menu-bar-menu-frame-live-and-visible-p () "Return non-nil if the menu frame is alive and visible. The menu frame is the frame for which we are updating the menu." diff --git a/lisp/tmm.el b/lisp/tmm.el index fc02fd5790..4c2855751c 100644 --- a/lisp/tmm.el +++ b/lisp/tmm.el @@ -43,7 +43,6 @@ tmm-next-shortcut-digit (defvar tmm-table-undef) ;;;###autoload (define-key global-map "\M-`" 'tmm-menubar) -;;;###autoload (define-key global-map [menu-bar mouse-1] 'tmm-menubar-mouse) ;;;###autoload (defun tmm-menubar (&optional x-position) -- 2.20.1