diff options
| -rw-r--r-- | lisp/ChangeLog | 10 | ||||
| -rw-r--r-- | lisp/term/x-win.el | 10 |
2 files changed, 16 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e3d6cdc98d6..a6f7849346b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2005-06-10 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * term/x-win.el (x-clipboard-yank): Remove condition-case | ||
| 4 | wrapping. | ||
| 5 | |||
| 6 | 2005-06-11 Kenichi Handa <handa@m17n.org> | ||
| 7 | |||
| 8 | * add-log.el (change-log-font-lock-keywords): Make the regexp for | ||
| 9 | date lines stricter. | ||
| 10 | |||
| 1 | 2005-06-10 Zhang Wei <id.brep@gmail.com> (tiny change) | 11 | 2005-06-10 Zhang Wei <id.brep@gmail.com> (tiny change) |
| 2 | 12 | ||
| 3 | * term/x-win.el (x-clipboard-yank): Use x-selection-value instead | 13 | * term/x-win.el (x-clipboard-yank): Use x-selection-value instead |
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)) |