]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't use STRING as first choice when pasting PRIMARY (Bug#6802).
authorJan Djärv <jan.h.d@swipnet.se>
Sun, 31 Oct 2010 16:03:11 +0000 (17:03 +0100)
committerJan Djärv <jan.h.d@swipnet.se>
Sun, 31 Oct 2010 16:03:11 +0000 (17:03 +0100)
* 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).

lisp/ChangeLog
lisp/term/x-win.el

index 61a23268f41526dd3fcfe48ad1db758f212ed0a0..9b812b00d66d4e6fd50b1271aadc355d938b3509 100644 (file)
@@ -1,3 +1,8 @@
+2010-10-31  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * term/x-win.el (x-get-selection-value): New function that gets
+       PRIMARY with type as specified in x-select-request-type. (Bug#6802).
+
 2010-10-31  Michael Albinus  <michael.albinus@gmx.de>
 
        * net/tramp.el (tramp-handle-insert-file-contents): For root,
index bd42601253295a432a629be5fa86a04c4b78807c..afb706ab97298cc68b558bad862162bff9cbd0e1 100644 (file)
@@ -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 "*")