]> git.eshelyaron.com Git - emacs.git/commitdiff
Enable TTY menus with xterm-mouse-mode
authorJared Finder <jared@finder.org>
Wed, 7 Oct 2020 03:04:12 +0000 (20:04 -0700)
committerEli Zaretskii <eliz@gnu.org>
Sat, 24 Oct 2020 10:22:55 +0000 (13:22 +0300)
* lisp/tmm.el: No need to bind 'tmm-menubar-mouse' to mouse clicks
on the menu bar.
* lisp/menu-bar.el (global-map): Bind 'menu-bar-open-mouse' to
mouse click on menu bar.  This is needed in xt-mouse.

* etc/NEWS: Announce TTY menu support in xterm-mouse-mode.

etc/NEWS
lisp/menu-bar.el
lisp/tmm.el

index a212edfcfb2bca838ffcc9e7d21b28330ecbcbfa..a405c0dd3d7d146716e803aab8b26f66988142cb 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1325,6 +1325,16 @@ to 'tab-bar-new-tab-choice' for new tabs to show the bookmark list.
 'gomoku-move-sw' and 'gomoku-move-ne' now work correctly, and
 horizontal movements now stop at the edge of the board.
 
+** 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 on 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.
index e78c1a6c70735b4a8a501fa2c048bab4943abe13..e42602364d24fbb744432f33fa7d5c26ce64225d 100644 (file)
@@ -2088,6 +2088,8 @@ key, a click, or a menu-item"))
 (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."
index fc02fd579079802a1853fae584b27998b692712d..4c2855751c2e1087448d019b2496ef872170ae37 100644 (file)
@@ -43,7 +43,6 @@
 (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)