Mercurial > emacs
diff lisp/term/x-win.el @ 23903:7d1efca4eadc
(x-cut-buffer-or-selection-value):
If clipboard is enabled, try it before PRIMARY selection.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Wed, 16 Dec 1998 06:41:52 +0000 |
parents | 29fd5e07b576 |
children | a0674327c167 |
line wrap: on
line diff
--- a/lisp/term/x-win.el Wed Dec 16 06:34:51 1998 +0000 +++ b/lisp/term/x-win.el Wed Dec 16 06:41:52 1998 +0000 @@ -587,16 +587,6 @@ ;;; 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 @@ (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))