1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-26 19:18:50 +00:00

(x-clipboard-yank): Remove condition-case

wrapping.
This commit is contained in:
Kenichi Handa 2005-06-10 05:41:46 +00:00
parent 121c59a3e4
commit d8338794e7
2 changed files with 16 additions and 4 deletions

View File

@ -1,3 +1,13 @@
2005-06-10 Kenichi Handa <handa@m17n.org>
* term/x-win.el (x-clipboard-yank): Remove condition-case
wrapping.
2005-06-11 Kenichi Handa <handa@m17n.org>
* add-log.el (change-log-font-lock-keywords): Make the regexp for
date lines stricter.
2005-06-10 Zhang Wei <id.brep@gmail.com> (tiny change)
* term/x-win.el (x-clipboard-yank): Use x-selection-value instead

View File

@ -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))