diff options
author | Jan Djärv <jan.h.d@swipnet.se> | 2010-10-31 17:03:11 +0100 |
---|---|---|
committer | Jan Djärv <jan.h.d@swipnet.se> | 2010-10-31 17:03:11 +0100 |
commit | 04e6379658b7d4ac14fc829064be879a8c4f82e9 (patch) | |
tree | 9243ff256f91448d4fa7287d9daa02146e7e7da7 /lisp/term/x-win.el | |
parent | 2699a55464f7b43171c7b0e64d095640904e9e21 (diff) | |
download | emacs-04e6379658b7d4ac14fc829064be879a8c4f82e9.tar.gz emacs-04e6379658b7d4ac14fc829064be879a8c4f82e9.tar.bz2 emacs-04e6379658b7d4ac14fc829064be879a8c4f82e9.zip |
Don't use STRING as first choice when pasting PRIMARY (Bug#6802).
* lisp/term/x-win.el (x-get-selection-value): New function that gets
PRIMARY with type as specified in x-select-request-type. (Bug#6802).
Diffstat (limited to 'lisp/term/x-win.el')
-rw-r--r-- | lisp/term/x-win.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index bd426012532..afb706ab972 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el @@ -1279,6 +1279,13 @@ The value nil is the same as this list: (setq interprogram-cut-function 'x-select-text) (setq interprogram-paste-function 'x-selection-value) +;; Make paste from other applications use the decoding in x-select-request-type +;; and not just STRING. +(defun x-get-selection-value () + "Get the current value of the PRIMARY selection. +Request data types in the order specified by `x-select-request-type'." + (x-selection-value-internal 'PRIMARY)) + (defun x-clipboard-yank () "Insert the clipboard contents, or the last stretch of killed text." (interactive "*") |