From 63e88db35a9388d7f74266a72187ad3bf22656cc Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 10 Jun 2005 01:52:13 +0000 Subject: (x-clipboard-yank): Use x-selection-value instead of x-get-selection. --- lisp/term/x-win.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/term') diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index 5b4ff6d2f7c..a4118029eaa 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el @@ -2467,7 +2467,7 @@ order until succeed.") (interactive) (let ((clipboard-text (condition-case nil - (x-get-selection 'CLIPBOARD) + (x-selection-value 'CLIPBOARD) (error nil))) (x-select-enable-clipboard t)) (if (and clipboard-text (> (length clipboard-text) 0)) -- cgit v1.2.1 From d8338794e7ced36f47e50a5877b4e716ccbf1060 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 10 Jun 2005 05:41:46 +0000 Subject: (x-clipboard-yank): Remove condition-case wrapping. --- lisp/term/x-win.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lisp/term') 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.") ctext utf8))))) +;; Get a selection value of type TYPE by calling x-get-selection with +;; an appropiate DATA-TYPE argument decidd by `x-select-request-type'. +;; The return value is already decoded. If x-get-selection causes an +;; error, this function return nil. + (defun x-selection-value (type) (let (text) (cond ((null x-select-request-type) @@ -2465,10 +2470,7 @@ order until succeed.") (defun x-clipboard-yank () "Insert the clipboard contents, or the last stretch of killed text." (interactive) - (let ((clipboard-text - (condition-case nil - (x-selection-value 'CLIPBOARD) - (error nil))) + (let ((clipboard-text (x-selection-value 'CLIPBOARD)) (x-select-enable-clipboard t)) (if (and clipboard-text (> (length clipboard-text) 0)) (kill-new clipboard-text)) -- cgit v1.2.1