summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2022-06-18 19:21:21 +0300
committerEli Zaretskii <eliz@gnu.org>2022-06-18 19:21:21 +0300
commit7e1f84fa3bc7dfd84415813889c91070c0759da2 (patch)
treefda6078caa8f3ce0224480c9ba504be62178bc10
parent233b3dc7e167298611d96af923abb8009f587179 (diff)
downloademacs-7e1f84fa3bc7dfd84415813889c91070c0759da2.tar.gz
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/NEWS4
-rw-r--r--lisp/frame.el12
-rw-r--r--lisp/term/xterm.el8
3 files changed, 11 insertions, 13 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 438cec9257f..f9eb81908b8 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -509,8 +509,8 @@ the 'COLORTERM' environment variable is set to the value "truecolor".
*** Select active regions with xterm selection support.
On terminals with xterm setSelection support, the active region may be
saved to the X primary selection, following the
-'select-active-regions' variable. This support is enabled with
-'xterm-select-active-regions'.
+'select-active-regions' variable. This support is enabled when
+'tty-select-active-regions' is non-nil.
** ERT
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)."
(defalias 'display-multi-frame-p #'display-graphic-p)
(defalias 'display-multi-font-p #'display-graphic-p)
-;; From term/xterm.el
-(defvar xterm-select-active-regions)
+(defcustom tty-select-active-regions nil
+ "If non-nil, update PRIMARY window-system selection on text-mode frames.
+On a text-mode terminal that supports setSelection command, if
+this variable is non-nil, Emacs will set the PRIMARY selection
+from the active region, according to `select-active-regions'.
+This is currently supported only on xterm."
+ :version "29.1"
+ :type 'boolean)
(defun display-selections-p (&optional display)
"Return non-nil if DISPLAY supports selections.
@@ -2167,7 +2173,7 @@ frame's display)."
(not (null dos-windows-version))))
((memq frame-type '(x w32 ns pgtk))
t)
- ((and xterm-select-active-regions
+ ((and tty-select-active-regions
(terminal-parameter nil 'xterm--set-selection))
t)
(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."
:version "28.1"
:type 'boolean)
-(defcustom xterm-select-active-regions nil
- "If non-nil, update PRIMARY X selection on text-mode frames.
-On a text-mode terminal that supports setSelection command, if
-this variable is non-nil, Emacs will set the PRIMARY selection
-from the active region, according to `select-active-regions'."
- :version "29.1"
- :type 'boolean)
-
(defconst xterm-paste-ending-sequence "\e[201~"
"Characters sent by the terminal to end a bracketed paste.")