aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorEli Zaretskii2022-06-18 19:21:21 +0300
committerEli Zaretskii2022-06-18 19:21:21 +0300
commit7e1f84fa3bc7dfd84415813889c91070c0759da2 (patch)
treefda6078caa8f3ce0224480c9ba504be62178bc10 /lisp
parent233b3dc7e167298611d96af923abb8009f587179 (diff)
downloademacs-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)
Diffstat (limited to 'lisp')
-rw-r--r--lisp/frame.el12
-rw-r--r--lisp/term/xterm.el8
2 files changed, 9 insertions, 11 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)."
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.
2154On a text-mode terminal that supports setSelection command, if
2155this variable is non-nil, Emacs will set the PRIMARY selection
2156from the active region, according to `select-active-regions'.
2157This 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.
85On a text-mode terminal that supports setSelection command, if
86this variable is non-nil, Emacs will set the PRIMARY selection
87from 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