diff options
| author | Jared Finder | 2024-12-09 22:16:40 -0800 |
|---|---|---|
| committer | Eli Zaretskii | 2024-12-12 12:51:13 +0200 |
| commit | 9ccd459e8452cc9e6e81e53f26bbeef20d2d5bb7 (patch) | |
| tree | 00c6b88af7b5ed5c21c5b51dfce019db96a07b47 | |
| parent | a4548739b8ed3ba20223d1043390f71afcdd8a2f (diff) | |
| download | emacs-9ccd459e8452cc9e6e81e53f26bbeef20d2d5bb7.tar.gz emacs-9ccd459e8452cc9e6e81e53f26bbeef20d2d5bb7.zip | |
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.
| -rw-r--r-- | etc/NEWS | 6 | ||||
| -rw-r--r-- | lisp/term/xterm.el | 2 | ||||
| -rw-r--r-- | lisp/xt-mouse.el | 2 |
3 files changed, 10 insertions, 0 deletions
| @@ -41,6 +41,12 @@ why the mark trace buffer is enabled by default. | |||
| 41 | 41 | ||
| 42 | * Startup Changes in Emacs 31.1 | 42 | * Startup Changes in Emacs 31.1 |
| 43 | 43 | ||
| 44 | ** When run inside xterm, 'xterm-mouse-mode' is turned on by default. | ||
| 45 | This means that the mouse will work by default inside xterm terminals. | ||
| 46 | If your terminal does not behave properly with xterm mouse tracking | ||
| 47 | enabled, you can disable mouse tracking by putting '(xterm-mouse-mode | ||
| 48 | -1)' in your init file. | ||
| 49 | |||
| 44 | 50 | ||
| 45 | * Changes in Emacs 31.1 | 51 | * Changes in Emacs 31.1 |
| 46 | 52 | ||
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." | |||
| 907 | 907 | ||
| 908 | (when xterm-set-window-title | 908 | (when xterm-set-window-title |
| 909 | (xterm--init-frame-title)) | 909 | (xterm--init-frame-title)) |
| 910 | (when xterm-mouse-mode | ||
| 911 | (xterm-mouse-mode 1)) | ||
| 910 | ;; Unconditionally enable bracketed paste mode: terminals that don't | 912 | ;; Unconditionally enable bracketed paste mode: terminals that don't |
| 911 | ;; support it just ignore the sequence. | 913 | ;; support it just ignore the sequence. |
| 912 | (xterm--init-bracketed-paste-mode) | 914 | (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 | |||
| 358 | mouse functionality for such clicks is still available by holding | 358 | mouse functionality for such clicks is still available by holding |
| 359 | down the SHIFT key while pressing the mouse button." | 359 | down the SHIFT key while pressing the mouse button." |
| 360 | :global t :group 'mouse | 360 | :global t :group 'mouse |
| 361 | :init-value t | ||
| 362 | :version "31.1" | ||
| 361 | (funcall (if xterm-mouse-mode 'add-hook 'remove-hook) | 363 | (funcall (if xterm-mouse-mode 'add-hook 'remove-hook) |
| 362 | 'terminal-init-xterm-hook | 364 | 'terminal-init-xterm-hook |
| 363 | 'turn-on-xterm-mouse-tracking-on-terminal) | 365 | 'turn-on-xterm-mouse-tracking-on-terminal) |