mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 18:40:39 -08:00
(x-cut-buffer-or-selection-value): Try both
COMPOUND_TEXT and STRING as types for the selection.
This commit is contained in:
parent
4ab455e6c8
commit
8ba1358119
1 changed files with 15 additions and 6 deletions
|
|
@ -590,15 +590,24 @@ This is in addition to the primary selection.")
|
|||
|
||||
;; 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))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue