aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/term
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/term')
-rw-r--r--lisp/term/x-win.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index a4118029eaa..458cff0ae6d 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -2183,6 +2183,11 @@ order until succeed.")
2183 ctext 2183 ctext
2184 utf8))))) 2184 utf8)))))
2185 2185
2186;; Get a selection value of type TYPE by calling x-get-selection with
2187;; an appropiate DATA-TYPE argument decidd by `x-select-request-type'.
2188;; The return value is already decoded. If x-get-selection causes an
2189;; error, this function return nil.
2190
2186(defun x-selection-value (type) 2191(defun x-selection-value (type)
2187 (let (text) 2192 (let (text)
2188 (cond ((null x-select-request-type) 2193 (cond ((null x-select-request-type)
@@ -2465,10 +2470,7 @@ order until succeed.")
2465(defun x-clipboard-yank () 2470(defun x-clipboard-yank ()
2466 "Insert the clipboard contents, or the last stretch of killed text." 2471 "Insert the clipboard contents, or the last stretch of killed text."
2467 (interactive) 2472 (interactive)
2468 (let ((clipboard-text 2473 (let ((clipboard-text (x-selection-value 'CLIPBOARD))
2469 (condition-case nil
2470 (x-selection-value 'CLIPBOARD)
2471 (error nil)))
2472 (x-select-enable-clipboard t)) 2474 (x-select-enable-clipboard t))
2473 (if (and clipboard-text (> (length clipboard-text) 0)) 2475 (if (and clipboard-text (> (length clipboard-text) 0))
2474 (kill-new clipboard-text)) 2476 (kill-new clipboard-text))