summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/frame.el6
-rw-r--r--lisp/term/xterm.el8
2 files changed, 14 insertions, 0 deletions
diff --git a/lisp/frame.el b/lisp/frame.el
index 27f99fb7d21..35863c01350 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -2149,6 +2149,9 @@ 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)
+
(defun display-selections-p (&optional display)
"Return non-nil if DISPLAY supports selections.
A selection is a way to transfer text or other data between programs
@@ -2164,6 +2167,9 @@ frame's display)."
(not (null dos-windows-version))))
((memq frame-type '(x w32 ns pgtk))
t)
+ ((and xterm-select-active-regions
+ (terminal-parameter nil 'xterm--set-selection))
+ t)
(t
nil))))
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index a7e257f41c5..0791780d406 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -80,6 +80,14 @@ 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.")