Mercurial > hg > xemacs-beta
comparison lisp/x-select.el @ 424:11054d720c21 r21-2-20
Import from CVS: tag r21-2-20
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:26:11 +0200 |
parents | ebe98a74bd68 |
children |
comparison
equal
deleted
inserted
replaced
423:28d9c139be4c | 424:11054d720c21 |
---|---|
48 (define-obsolete-function-alias 'x-kill-primary-selection 'kill-primary-selection) | 48 (define-obsolete-function-alias 'x-kill-primary-selection 'kill-primary-selection) |
49 (define-obsolete-function-alias 'x-select-make-extent-for-selection | 49 (define-obsolete-function-alias 'x-select-make-extent-for-selection |
50 'select-make-extent-for-selection) | 50 'select-make-extent-for-selection) |
51 (define-obsolete-function-alias 'x-cut-copy-clear-internal 'cut-copy-clear-internal) | 51 (define-obsolete-function-alias 'x-cut-copy-clear-internal 'cut-copy-clear-internal) |
52 (define-obsolete-function-alias 'x-get-selection 'get-selection) | 52 (define-obsolete-function-alias 'x-get-selection 'get-selection) |
53 (define-obsolete-function-alias 'x-get-clipboard 'get-clipboard) | |
54 (define-obsolete-function-alias 'x-yank-clipboard-selection | |
55 'yank-clipboard-selection) | |
53 (define-obsolete-function-alias 'x-disown-selection-internal | 56 (define-obsolete-function-alias 'x-disown-selection-internal |
54 'disown-selection-internal) | 57 'disown-selection-internal) |
55 | 58 |
56 (defun x-get-secondary-selection () | 59 (defun x-get-secondary-selection () |
57 "Return text selected from some X window." | 60 "Return text selected from some X window." |
58 (get-selection 'SECONDARY)) | 61 (get-selection 'SECONDARY)) |
59 | |
60 (defun x-get-clipboard () | |
61 "Return text pasted to the clipboard." | |
62 (get-selection 'CLIPBOARD)) | |
63 | 62 |
64 (defun x-own-secondary-selection (selection &optional type) | 63 (defun x-own-secondary-selection (selection &optional type) |
65 "Make a secondary X Selection of the given argument. The argument may be a | 64 "Make a secondary X Selection of the given argument. The argument may be a |
66 string or a cons of two markers (in which case the selection is considered to | 65 string or a cons of two markers (in which case the selection is considered to |
67 be the text between those markers)." | 66 be the text between those markers)." |
152 (if push | 151 (if push |
153 (x-rotate-cutbuffers-internal 1)) | 152 (x-rotate-cutbuffers-internal 1)) |
154 (x-store-cutbuffer-internal 'CUT_BUFFER0 string)))) | 153 (x-store-cutbuffer-internal 'CUT_BUFFER0 string)))) |
155 | 154 |
156 | 155 |
157 ;;; Random utility functions | |
158 | |
159 (defun x-yank-clipboard-selection () | |
160 "Insert the current Clipboard selection at point." | |
161 (interactive "*") | |
162 (setq last-command nil) | |
163 (setq this-command 'yank) ; so that yank-pop works. | |
164 (let ((clip (x-get-clipboard))) | |
165 (or clip (error "there is no clipboard selection")) | |
166 (push-mark) | |
167 (insert clip))) | |
168 | |
169 | |
170 ;FSFmacs (provide 'select) | 156 ;FSFmacs (provide 'select) |
171 | 157 |
172 ;;; x-select.el ends here. | 158 ;;; x-select.el ends here. |