From: Richard M. Stallman Date: Wed, 11 Aug 1993 06:17:43 +0000 (+0000) Subject: (mouse-set-point): Use event-end, not event-start. X-Git-Tag: emacs-19.34~11297 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2a5fa27beb0bd95868c2ebdb7dd7eeac79f745b1;p=emacs.git (mouse-set-point): Use event-end, not event-start. --- diff --git a/lisp/mouse.el b/lisp/mouse.el index 76d2828cddc..d8a6efc5f56 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -91,11 +91,13 @@ This command must be bound to a mouse click." (split-window-horizontally (min (max new-width first-col) last-col)))))) -(defun mouse-set-point (click) +(defun mouse-set-point (event) "Move point to the position clicked on with the mouse. -This must be bound to a mouse click." +This should be bound to a mouse click event type." (interactive "e") - (let ((posn (event-start click))) + ;; Use event-end in case called from mouse-drag-region. + ;; If EVENT is a click, event-end and event-start give same value. + (let ((posn (event-end event))) (and (window-minibuffer-p (posn-window posn)) (not (minibuffer-window-active-p (posn-window posn))) (error "Minibuffer window is not active")) @@ -105,7 +107,7 @@ This must be bound to a mouse click." (defun mouse-set-region (click) "Set the region to the text that the mouse is dragged over. -This must be bound to a mouse drag event." +This should be bound to a mouse drag event." (interactive "e") (let ((posn (event-start click)) (end (event-end click)))