Mercurial > emacs
comparison lisp/term/x-win.el @ 55343:b925746ed8e7
* term/x-win.el (x-clipboard-yank): Don't exit on error from
x-get-selection.
author | Jan Djärv <jan.h.d@swipnet.se> |
---|---|
date | Mon, 03 May 2004 20:02:49 +0000 |
parents | b8d76d842cb9 |
children | 302e4e1415d3 46882e012e30 4c90ffeb71c5 |
comparison
equal
deleted
inserted
replaced
55342:44d086f5e08a | 55343:b925746ed8e7 |
---|---|
2457 | 2457 |
2458 ;; Override Paste so it looks at CLIPBOARD first. | 2458 ;; Override Paste so it looks at CLIPBOARD first. |
2459 (defun x-clipboard-yank () | 2459 (defun x-clipboard-yank () |
2460 "Insert the clipboard contents, or the last stretch of killed text." | 2460 "Insert the clipboard contents, or the last stretch of killed text." |
2461 (interactive) | 2461 (interactive) |
2462 (let ((clipboard-text (x-get-selection 'CLIPBOARD)) | 2462 (let ((clipboard-text |
2463 (condition-case nil | |
2464 (x-get-selection 'CLIPBOARD) | |
2465 (error nil))) | |
2463 (x-select-enable-clipboard t)) | 2466 (x-select-enable-clipboard t)) |
2464 (if (and clipboard-text (> (length clipboard-text) 0)) | 2467 (if (and clipboard-text (> (length clipboard-text) 0)) |
2465 (kill-new clipboard-text)) | 2468 (kill-new clipboard-text)) |
2466 (yank))) | 2469 (yank))) |
2467 | 2470 |