Mercurial > emacs
changeset 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 | 1c12a73f742d |
children | 74c3c643e90c |
files | lisp/term/x-win.el |
diffstat | 1 files changed, 11 insertions(+), 10 deletions(-) [+] |
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))