Mercurial > emacs
changeset 19112:3940bb7f5515
(x-cut-buffer-or-selection-value): Try both
COMPOUND_TEXT and STRING as types for the selection.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 04 Aug 1997 01:53:36 +0000 |
parents | e561070ee48c |
children | c21a3a07b6fd |
files | lisp/term/x-win.el |
diffstat | 1 files changed, 15 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/term/x-win.el Mon Aug 04 01:42:50 1997 +0000 +++ b/lisp/term/x-win.el Mon Aug 04 01:53:36 1997 +0000 @@ -590,15 +590,24 @@ ;; Don't die if x-get-selection signals an error. (condition-case c - (setq text (x-get-selection 'PRIMARY)) + (setq text (x-get-selection 'PRIMARY 'COMPOUND_TEXT)) + (error nil)) + (if (string= text "") (setq text nil)) + (condition-case c + (setq text (x-get-selection 'PRIMARY 'STRING)) (error nil)) (if (string= text "") (setq text nil)) - (if x-select-enable-clipboard - (condition-case c - (setq text (x-get-selection 'CLIPBOARD)) - (error nil))) - (if (string= text "") (setq text nil)) + (when x-select-enable-clipboard + (condition-case c + (setq text (x-get-selection 'CLIPBOARD 'COMPOUND_TEXT)) + (error nil)) + (if (string= text "") (setq text nil)) + (condition-case c + (setq text (x-get-selection 'CLIPBOARD 'STRING)) + (error nil)) + (if (string= text "") (setq text nil))) + (or text (setq text (x-get-cut-buffer 0))) (if (string= text "") (setq text nil))