aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/term
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1997-08-04 01:53:36 +0000
committerRichard M. Stallman <[email protected]>1997-08-04 01:53:36 +0000
commit8ba1358119b4b264e04691a817d183af89a0ceed (patch)
treee81d19a4041c66ba6ea0e259a641a5c8516aa77c /lisp/term
parent4ab455e6c8f8935cc96dde1d1bc18c2ded225c68 (diff)
(x-cut-buffer-or-selection-value): Try both
COMPOUND_TEXT and STRING as types for the selection.
Diffstat (limited to 'lisp/term')
-rw-r--r--lisp/term/x-win.el21
1 files changed, 15 insertions, 6 deletions
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index d991f3b76a..2a09302e19 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -590,15 +590,24 @@ This is in addition to the primary selection.")
;; Don't die if x-get-selection signals an error.
(condition-case c
- (setq text (x-get-selection 'PRIMARY))
+ (setq text (x-get-selection 'PRIMARY 'COMPOUND_TEXT))
(error nil))
(if (string= text "") (setq text nil))
-
- (if x-select-enable-clipboard
- (condition-case c
- (setq text (x-get-selection 'CLIPBOARD))
- (error nil)))
+ (condition-case c
+ (setq text (x-get-selection 'PRIMARY 'STRING))
+ (error nil))
(if (string= text "") (setq text nil))
+
+ (when x-select-enable-clipboard
+ (condition-case c
+ (setq text (x-get-selection 'CLIPBOARD 'COMPOUND_TEXT))
+ (error nil))
+ (if (string= text "") (setq text nil))
+ (condition-case c
+ (setq text (x-get-selection 'CLIPBOARD 'STRING))
+ (error nil))
+ (if (string= text "") (setq text nil)))
+
(or text (setq text (x-get-cut-buffer 0)))
(if (string= text "") (setq text nil))