changeset 63191:d9becfcb69a7

(x-clipboard-yank): Remove condition-case wrapping.
author Kenichi Handa <handa@m17n.org>
date Fri, 10 Jun 2005 05:41:35 +0000
parents ff6c8b50eefd
children 5f98613658a7
files lisp/term/x-win.el
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/term/x-win.el	Fri Jun 10 05:31:45 2005 +0000
+++ b/lisp/term/x-win.el	Fri Jun 10 05:41:35 2005 +0000
@@ -2183,6 +2183,11 @@
 	    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 @@
 (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))