emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 92d3702 3/3: Enable TTY menus with xterm-mouse-mode


From: Eli Zaretskii
Subject: master 92d3702 3/3: Enable TTY menus with xterm-mouse-mode
Date: Sat, 24 Oct 2020 06:23:58 -0400 (EDT)

branch: master
commit 92d37029a755e7f610c3bc10c816763c5d853d2f
Author: Jared Finder <jared@finder.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Enable TTY menus with xterm-mouse-mode
    
    * 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         | 10 ++++++++++
 lisp/menu-bar.el |  2 ++
 lisp/tmm.el      |  1 -
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/etc/NEWS b/etc/NEWS
index a212edf..a405c0d 100644
--- 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.
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index e78c1a6..e426023 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -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."
diff --git a/lisp/tmm.el b/lisp/tmm.el
index fc02fd5..4c28557 100644
--- a/lisp/tmm.el
+++ b/lisp/tmm.el
@@ -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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]