-(defun mouse-drag-or-yank (event)
- "Either drag or paste the current selection.
-If the variable `mouse-yank-at-point' is non-nil,
-move the cursor to the location of the click before pasting.
-This functions has to be improved. Currently it is just a (working) test."
- ;; by Oliver Graf <ograf@fga.de>
- (interactive "e")
- (if (click-inside-extent-p event zmacs-region-extent)
- ;; okay, this is a drag
- (cond ((featurep 'offix)
- (offix-start-drag-region
- event
- (extent-start-position zmacs-region-extent)
- (extent-end-position zmacs-region-extent)))
- ((featurep 'cde)
- ;; should also work with CDE
- (cde-start-drag-region event
- (extent-start-position zmacs-region-extent)
- (extent-end-position zmacs-region-extent)))
- (t (error "No offix or CDE support compiled in")))
- ;; no drag, call region-funct
- (and (not mouse-yank-at-point)
- (mouse-set-point event))
- (funcall mouse-yank-function))
- )
+(defun mouse-begin-drag-n-drop (event)
+ "Begin a drag-n-drop operation.
+EVENT should be the button event that initiated the drag.
+Returns whether a drag was begun."
+ ;; #### barely implemented.
+ (when (click-inside-selection-p event)
+ (cond ((featurep 'offix)
+ (offix-start-drag-region
+ event
+ (extent-start-position zmacs-region-extent)
+ (extent-end-position zmacs-region-extent))
+ t)
+ ((featurep 'cde)
+ ;; should also work with CDE
+ (cde-start-drag-region event
+ (extent-start-position zmacs-region-extent)
+ (extent-end-position zmacs-region-extent))
+ t))))