Mercurial > emacs
diff lisp/term/x-win.el @ 111264:238b8ef4506c
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).
author | Jan D. <jan.h.d@swipnet.se> |
---|---|
date | Sun, 31 Oct 2010 17:03:11 +0100 |
parents | 6cf6c01cf9bf |
children | 417b1e4d63cd |
line wrap: on
line diff
--- a/lisp/term/x-win.el Sun Oct 31 10:41:32 2010 -0400 +++ b/lisp/term/x-win.el Sun Oct 31 17:03:11 2010 +0100 @@ -1279,6 +1279,13 @@ (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 "*")