summaryrefslogtreecommitdiff
path: root/lisp/frame.el
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 /lisp/frame.el
parent233b3dc7e167298611d96af923abb8009f587179 (diff)
downloademacs-7e1f84fa3bc7dfd84415813889c91070c0759da2.tar.gz
emacs-7e1f84fa3bc7dfd84415813889c91070c0759da2.tar.bz2
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)
Diffstat (limited to 'lisp/frame.el')
-rw-r--r--lisp/frame.el12
1 files changed, 9 insertions, 3 deletions
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