Mercurial > hg > xemacs-beta
comparison lisp/mouse.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 |
---|---|
82 | 82 |
83 (defvar mouse-yank-function 'mouse-consolidated-yank | 83 (defvar mouse-yank-function 'mouse-consolidated-yank |
84 "Function that is called upon by `mouse-yank' to actually insert text.") | 84 "Function that is called upon by `mouse-yank' to actually insert text.") |
85 | 85 |
86 (defun mouse-consolidated-yank () | 86 (defun mouse-consolidated-yank () |
87 "Insert the current selection or, if there is none under X insert the X cutbuffer. | 87 "Insert the current selection or, if there is none under X insert |
88 A mark is pushed, so that the inserted text lies between point and mark." | 88 the X cutbuffer. A mark is pushed, so that the inserted text lies |
89 between point and mark." | |
89 (interactive) | 90 (interactive) |
90 (if (not (console-on-window-system-p)) | 91 (if (not (console-on-window-system-p)) |
91 (yank) | 92 (yank) |
92 (push-mark) | 93 (push-mark) |
93 (if (region-active-p) | 94 (if (region-active-p) |
223 ;; by Oliver Graf <ograf@fga.de> | 224 ;; by Oliver Graf <ograf@fga.de> |
224 (interactive "e") | 225 (interactive "e") |
225 (if (click-inside-extent-p event zmacs-region-extent) | 226 (if (click-inside-extent-p event zmacs-region-extent) |
226 ;; okay, this is a drag | 227 ;; okay, this is a drag |
227 (cond ((featurep 'offix) | 228 (cond ((featurep 'offix) |
228 (offix-start-drag-region event | 229 (offix-start-drag-region |
229 (extent-start-position zmacs-region-extent) | 230 event |
230 (extent-end-position zmacs-region-extent))) | 231 (extent-start-position zmacs-region-extent) |
232 (extent-end-position zmacs-region-extent))) | |
231 ((featurep 'cde) | 233 ((featurep 'cde) |
232 ;; should also work with CDE | 234 ;; should also work with CDE |
233 (cde-start-drag-region event | 235 (cde-start-drag-region event |
234 (extent-start-position zmacs-region-extent) | 236 (extent-start-position zmacs-region-extent) |
235 (extent-end-position zmacs-region-extent))) | 237 (extent-end-position zmacs-region-extent))) |