emacs-diffs
[Top][All Lists]
Advanced

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

master 9ccd459e845: Enable xterm-mouse-mode by default in xterm


From: Eli Zaretskii
Subject: master 9ccd459e845: Enable xterm-mouse-mode by default in xterm
Date: Thu, 12 Dec 2024 05:51:59 -0500 (EST)

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

    Enable xterm-mouse-mode by default in xterm
    
    * lisp/xt-mouse.el (xterm-mouse-mode): Change default value of
    xterm-mouse-mode to t.
    * lisp/term/xterm.el (xterm--init): Enable xterm-mouse-mode if
    the default value is still set.
    * etc/NEWS: Document new behavior.
---
 etc/NEWS           | 6 ++++++
 lisp/term/xterm.el | 2 ++
 lisp/xt-mouse.el   | 2 ++
 3 files changed, 10 insertions(+)

diff --git a/etc/NEWS b/etc/NEWS
index a9978329eb8..d96e49402ba 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -41,6 +41,12 @@ why the mark trace buffer is enabled by default.
 
 * Startup Changes in Emacs 31.1
 
+** When run inside xterm, 'xterm-mouse-mode' is turned on by default.
+This means that the mouse will work by default inside xterm terminals.
+If your terminal does not behave properly with xterm mouse tracking
+enabled, you can disable mouse tracking by putting '(xterm-mouse-mode
+-1)' in your init file.
+
 
 * Changes in Emacs 31.1
 
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index 82f9a60b53b..c4f33cd0faa 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -907,6 +907,8 @@ We run the first FUNCTION whose STRING matches the input 
events."
 
   (when xterm-set-window-title
     (xterm--init-frame-title))
+  (when xterm-mouse-mode
+    (xterm-mouse-mode 1))
   ;; Unconditionally enable bracketed paste mode: terminals that don't
   ;; support it just ignore the sequence.
   (xterm--init-bracketed-paste-mode)
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el
index 8cbb44ece14..c77d763702c 100644
--- a/lisp/xt-mouse.el
+++ b/lisp/xt-mouse.el
@@ -358,6 +358,8 @@ single clicks are supported.  When turned on, the normal 
xterm
 mouse functionality for such clicks is still available by holding
 down the SHIFT key while pressing the mouse button."
   :global t :group 'mouse
+  :init-value t
+  :version "31.1"
   (funcall (if xterm-mouse-mode 'add-hook 'remove-hook)
            'terminal-init-xterm-hook
            'turn-on-xterm-mouse-tracking-on-terminal)



reply via email to

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