changeset 4554:cf541ed1fed8

(mouse-set-point): Use event-end, not event-start.
author Richard M. Stallman <rms@gnu.org>
date Wed, 11 Aug 1993 06:17:43 +0000
parents ceb140c16ad2
children 434ef4c2fda7
files lisp/mouse.el
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mouse.el	Wed Aug 11 06:02:05 1993 +0000
+++ b/lisp/mouse.el	Wed Aug 11 06:17:43 1993 +0000
@@ -91,11 +91,13 @@
 	(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 @@
 
 (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)))