diff options
| author | Kenichi Handa | 2005-06-10 05:41:46 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2005-06-10 05:41:46 +0000 |
| commit | d8338794e7ced36f47e50a5877b4e716ccbf1060 (patch) | |
| tree | 774774cc3a94859166495324d04bc63f57359a36 /lisp/term | |
| parent | 121c59a3e42a0d596967bf3e4baa323ea9bd4ff2 (diff) | |
| download | emacs-d8338794e7ced36f47e50a5877b4e716ccbf1060.tar.gz emacs-d8338794e7ced36f47e50a5877b4e716ccbf1060.zip | |
(x-clipboard-yank): Remove condition-case
wrapping.
Diffstat (limited to 'lisp/term')
| -rw-r--r-- | lisp/term/x-win.el | 10 |
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)) |