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 5d2cb1afad2..ae36e208bff 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -2187,6 +2187,11 @@ order until succeed.")
2187 ctext 2187 ctext
2188 utf8))))) 2188 utf8)))))
2189 2189
2190;; Get a selection value of type TYPE by calling x-get-selection with
2191;; an appropiate DATA-TYPE argument decidd by `x-select-request-type'.
2192;; The return value is already decoded. If x-get-selection causes an
2193;; error, this function return nil.
2194
2190(defun x-selection-value (type) 2195(defun x-selection-value (type)
2191 (let (text) 2196 (let (text)
2192 (cond ((null x-select-request-type) 2197 (cond ((null x-select-request-type)
@@ -2341,10 +2346,7 @@ order until succeed.")
2341(defun x-clipboard-yank () 2346(defun x-clipboard-yank ()
2342 "Insert the clipboard contents, or the last stretch of killed text." 2347 "Insert the clipboard contents, or the last stretch of killed text."
2343 (interactive) 2348 (interactive)
2344 (let ((clipboard-text 2349 (let ((clipboard-text (x-selection-value 'CLIPBOARD))
2345 (condition-case nil
2346 (x-get-selection 'CLIPBOARD)
2347 (error nil)))
2348 (x-select-enable-clipboard t)) 2350 (x-select-enable-clipboard t))
2349 (if (and clipboard-text (> (length clipboard-text) 0)) 2351 (if (and clipboard-text (> (length clipboard-text) 0))
2350 (kill-new clipboard-text)) 2352 (kill-new clipboard-text))