comparison 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
comparison
equal deleted inserted replaced
111263:e7b46fb5cc2b 111264:238b8ef4506c
1277 1277
1278 ;; Arrange for the kill and yank functions to set and check the clipboard. 1278 ;; Arrange for the kill and yank functions to set and check the clipboard.
1279 (setq interprogram-cut-function 'x-select-text) 1279 (setq interprogram-cut-function 'x-select-text)
1280 (setq interprogram-paste-function 'x-selection-value) 1280 (setq interprogram-paste-function 'x-selection-value)
1281 1281
1282 ;; Make paste from other applications use the decoding in x-select-request-type
1283 ;; and not just STRING.
1284 (defun x-get-selection-value ()
1285 "Get the current value of the PRIMARY selection.
1286 Request data types in the order specified by `x-select-request-type'."
1287 (x-selection-value-internal 'PRIMARY))
1288
1282 (defun x-clipboard-yank () 1289 (defun x-clipboard-yank ()
1283 "Insert the clipboard contents, or the last stretch of killed text." 1290 "Insert the clipboard contents, or the last stretch of killed text."
1284 (interactive "*") 1291 (interactive "*")
1285 (let ((clipboard-text (x-selection-value-internal 'CLIPBOARD)) 1292 (let ((clipboard-text (x-selection-value-internal 'CLIPBOARD))
1286 (x-select-enable-clipboard t)) 1293 (x-select-enable-clipboard t))