# HG changeset patch # User Kenichi Handa # Date 1118382095 0 # Node ID d9becfcb69a7b3b9283bf91af2d32c8bcf616dbb # Parent ff6c8b50eefd852f7ebbe752c0b85e30267685e3 (x-clipboard-yank): Remove condition-case wrapping. diff -r ff6c8b50eefd -r d9becfcb69a7 lisp/term/x-win.el --- 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))