Commit 1be7f9b0 authored by Karl Heuer's avatar Karl Heuer
Browse files

(x-cut-buffer-or-selection-value):

If clipboard is enabled, try it before PRIMARY selection.
parent 1f447a50
......@@ -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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment