diff options
| author | Eli Zaretskii | 2022-06-18 19:21:21 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2022-06-18 19:21:21 +0300 |
| commit | 7e1f84fa3bc7dfd84415813889c91070c0759da2 (patch) | |
| tree | fda6078caa8f3ce0224480c9ba504be62178bc10 | |
| parent | 233b3dc7e167298611d96af923abb8009f587179 (diff) | |
| download | emacs-7e1f84fa3bc7dfd84415813889c91070c0759da2.tar.gz emacs-7e1f84fa3bc7dfd84415813889c91070c0759da2.zip | |
Fix test failures due to 'xterm-select-active-regions'
* lisp/frame.el (tty-select-active-regions): Rename from
xterm-select-active-regions and move here from xterm.c.
(display-selections-p): Adjust to the above. (Bug#55883)
| -rw-r--r-- | etc/NEWS | 4 | ||||
| -rw-r--r-- | lisp/frame.el | 12 | ||||
| -rw-r--r-- | lisp/term/xterm.el | 8 |
3 files changed, 11 insertions, 13 deletions
| @@ -509,8 +509,8 @@ the 'COLORTERM' environment variable is set to the value "truecolor". | |||
| 509 | *** Select active regions with xterm selection support. | 509 | *** Select active regions with xterm selection support. |
| 510 | On terminals with xterm setSelection support, the active region may be | 510 | On terminals with xterm setSelection support, the active region may be |
| 511 | saved to the X primary selection, following the | 511 | saved to the X primary selection, following the |
| 512 | 'select-active-regions' variable. This support is enabled with | 512 | 'select-active-regions' variable. This support is enabled when |
| 513 | 'xterm-select-active-regions'. | 513 | 'tty-select-active-regions' is non-nil. |
| 514 | 514 | ||
| 515 | ** ERT | 515 | ** ERT |
| 516 | 516 | ||
diff --git a/lisp/frame.el b/lisp/frame.el index 35863c01350..a6aa4475dd9 100644 --- a/lisp/frame.el +++ b/lisp/frame.el | |||
| @@ -2149,8 +2149,14 @@ frame's display)." | |||
| 2149 | (defalias 'display-multi-frame-p #'display-graphic-p) | 2149 | (defalias 'display-multi-frame-p #'display-graphic-p) |
| 2150 | (defalias 'display-multi-font-p #'display-graphic-p) | 2150 | (defalias 'display-multi-font-p #'display-graphic-p) |
| 2151 | 2151 | ||
| 2152 | ;; From term/xterm.el | 2152 | (defcustom tty-select-active-regions nil |
| 2153 | (defvar xterm-select-active-regions) | 2153 | "If non-nil, update PRIMARY window-system selection on text-mode frames. |
| 2154 | On a text-mode terminal that supports setSelection command, if | ||
| 2155 | this variable is non-nil, Emacs will set the PRIMARY selection | ||
| 2156 | from the active region, according to `select-active-regions'. | ||
| 2157 | This is currently supported only on xterm." | ||
| 2158 | :version "29.1" | ||
| 2159 | :type 'boolean) | ||
| 2154 | 2160 | ||
| 2155 | (defun display-selections-p (&optional display) | 2161 | (defun display-selections-p (&optional display) |
| 2156 | "Return non-nil if DISPLAY supports selections. | 2162 | "Return non-nil if DISPLAY supports selections. |
| @@ -2167,7 +2173,7 @@ frame's display)." | |||
| 2167 | (not (null dos-windows-version)))) | 2173 | (not (null dos-windows-version)))) |
| 2168 | ((memq frame-type '(x w32 ns pgtk)) | 2174 | ((memq frame-type '(x w32 ns pgtk)) |
| 2169 | t) | 2175 | t) |
| 2170 | ((and xterm-select-active-regions | 2176 | ((and tty-select-active-regions |
| 2171 | (terminal-parameter nil 'xterm--set-selection)) | 2177 | (terminal-parameter nil 'xterm--set-selection)) |
| 2172 | t) | 2178 | t) |
| 2173 | (t | 2179 | (t |
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 0791780d406..a7e257f41c5 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el | |||
| @@ -80,14 +80,6 @@ capabilities, and only when that terminal understands bracketed paste." | |||
| 80 | :version "28.1" | 80 | :version "28.1" |
| 81 | :type 'boolean) | 81 | :type 'boolean) |
| 82 | 82 | ||
| 83 | (defcustom xterm-select-active-regions nil | ||
| 84 | "If non-nil, update PRIMARY X selection on text-mode frames. | ||
| 85 | On a text-mode terminal that supports setSelection command, if | ||
| 86 | this variable is non-nil, Emacs will set the PRIMARY selection | ||
| 87 | from the active region, according to `select-active-regions'." | ||
| 88 | :version "29.1" | ||
| 89 | :type 'boolean) | ||
| 90 | |||
| 91 | (defconst xterm-paste-ending-sequence "\e[201~" | 83 | (defconst xterm-paste-ending-sequence "\e[201~" |
| 92 | "Characters sent by the terminal to end a bracketed paste.") | 84 | "Characters sent by the terminal to end a bracketed paste.") |
| 93 | 85 | ||