From: Karl Heuer Date: Wed, 16 Dec 1998 06:41:52 +0000 (+0000) Subject: (x-cut-buffer-or-selection-value): X-Git-Tag: emacs-20.4~1046 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1be7f9b0a59e0382a5155371a8d1cb131ed095fc;p=emacs.git (x-cut-buffer-or-selection-value): If clipboard is enabled, try it before PRIMARY selection. --- diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index 4728a05eda3..032b6f32e89 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el @@ -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))