]> code.delx.au - gnu-emacs/commitdiff
(x-cut-buffer-or-selection-value): Fix previous change.
authorRichard M. Stallman <rms@gnu.org>
Tue, 5 Aug 1997 22:03:07 +0000 (22:03 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 5 Aug 1997 22:03:07 +0000 (22:03 +0000)
lisp/term/x-win.el

index 2a09302e19b9b82d72c2776f1928037a196024f8..1557a6dd5bfe6f82282a447ed71e360e35dfd89b 100644 (file)
@@ -592,20 +592,20 @@ This is in addition to the primary selection.")
     (condition-case c
        (setq text (x-get-selection 'PRIMARY 'COMPOUND_TEXT))
       (error nil))
+    (if (null text) 
+       (condition-case c
+           (setq text (x-get-selection 'PRIMARY 'STRING))
+         (error nil)))
     (if (string= text "") (setq text 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 (null text) 
+         (condition-case c
+             (setq text (x-get-selection 'CLIPBOARD 'COMPOUND_TEXT))
+           (error nil)))
+      (if (null text) 
+         (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)))