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

If clipboard is enabled, try it before PRIMARY selection.
This commit is contained in:
Karl Heuer 1998-12-16 06:41:52 +00:00
parent 1f447a5015
commit 1be7f9b0a5

View 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))