]> git.eshelyaron.com Git - emacs.git/commitdiff
(x-cut-buffer-or-selection-value):
authorKarl Heuer <kwzh@gnu.org>
Wed, 16 Dec 1998 06:41:52 +0000 (06:41 +0000)
committerKarl Heuer <kwzh@gnu.org>
Wed, 16 Dec 1998 06:41:52 +0000 (06:41 +0000)
If clipboard is enabled, try it before PRIMARY selection.

lisp/term/x-win.el

index 4728a05eda3876ea70f34203493444f52f8c3c1d..032b6f32e8980fd7be032f9c2fd177b0248c0359 100644 (file)
@@ -587,16 +587,6 @@ This is in addition to the primary selection.")
 ;;; selection won't be added to the kill ring over and over.
 (defun x-cut-buffer-or-selection-value ()
   (let (text)
-
-    ;; Don't die if x-get-selection signals an error.
-    (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))
     (when x-select-enable-clipboard
       (if (null text) 
          (condition-case c
@@ -608,6 +598,17 @@ This is in addition to the primary selection.")
            (error nil)))
       (if (string= text "") (setq text nil)))
 
+    ;; Don't die if x-get-selection signals an error.
+    (if (null text) 
+       (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))
+
     (or text (setq text (x-get-cut-buffer 0)))
     (if (string= text "") (setq text nil))