diff options
| -rw-r--r-- | lisp/term/x-win.el | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index d991f3b76a8..2a09302e19b 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el | |||
| @@ -590,15 +590,24 @@ This is in addition to the primary selection.") | |||
| 590 | 590 | ||
| 591 | ;; Don't die if x-get-selection signals an error. | 591 | ;; Don't die if x-get-selection signals an error. |
| 592 | (condition-case c | 592 | (condition-case c |
| 593 | (setq text (x-get-selection 'PRIMARY)) | 593 | (setq text (x-get-selection 'PRIMARY 'COMPOUND_TEXT)) |
| 594 | (error nil)) | 594 | (error nil)) |
| 595 | (if (string= text "") (setq text nil)) | 595 | (if (string= text "") (setq text nil)) |
| 596 | 596 | (condition-case c | |
| 597 | (if x-select-enable-clipboard | 597 | (setq text (x-get-selection 'PRIMARY 'STRING)) |
| 598 | (condition-case c | 598 | (error nil)) |
| 599 | (setq text (x-get-selection 'CLIPBOARD)) | ||
| 600 | (error nil))) | ||
| 601 | (if (string= text "") (setq text nil)) | 599 | (if (string= text "") (setq text nil)) |
| 600 | |||
| 601 | (when x-select-enable-clipboard | ||
| 602 | (condition-case c | ||
| 603 | (setq text (x-get-selection 'CLIPBOARD 'COMPOUND_TEXT)) | ||
| 604 | (error nil)) | ||
| 605 | (if (string= text "") (setq text nil)) | ||
| 606 | (condition-case c | ||
| 607 | (setq text (x-get-selection 'CLIPBOARD 'STRING)) | ||
| 608 | (error nil)) | ||
| 609 | (if (string= text "") (setq text nil))) | ||
| 610 | |||
| 602 | (or text (setq text (x-get-cut-buffer 0))) | 611 | (or text (setq text (x-get-cut-buffer 0))) |
| 603 | (if (string= text "") (setq text nil)) | 612 | (if (string= text "") (setq text nil)) |
| 604 | 613 | ||