# HG changeset patch
# User Richard M. Stallman <rms@gnu.org>
# Date 814816112 0
# Node ID 4bc9015f709ee8f6d2dde0d30e79815d932f97a2
# Parent  77d8e407592e56414375cd0998e6768a4b03d65f
(mouse-drag-region): Set end-of-range after calling mouse-scroll-subr.
(mouse-set-region): Don't do the sit-for on a pc frame.

diff -r 77d8e407592e -r 4bc9015f709e lisp/mouse.el
--- a/lisp/mouse.el	Thu Oct 26 22:38:23 1995 +0000
+++ b/lisp/mouse.el	Fri Oct 27 17:48:32 1995 +0000
@@ -401,6 +401,7 @@
     ;; On X, we highlight while dragging, thus once again no need to bounce.
     (or transient-mark-mode
 	(eq (framep (selected-frame)) 'x)
+	(eq (framep (selected-frame)) 'pc)
 	(sit-for 1))
     (push-mark)
     (set-mark (point))
@@ -543,10 +544,14 @@
 		 ((null mouse-row))
 		 ((< mouse-row top)
 		  (mouse-scroll-subr start-window (- mouse-row top)
-				     mouse-drag-overlay start-point))
+				     mouse-drag-overlay start-point)
+		  ;; Without this, point tends to jump back to the starting
+		  ;; position where the mouse button was pressed down.
+		  (setq end-of-range (overlay-start mouse-drag-overlay)))
 		 ((>= mouse-row bottom)
 		  (mouse-scroll-subr start-window (1+ (- mouse-row bottom))
-				     mouse-drag-overlay start-point)))))))))
+				     mouse-drag-overlay start-point)
+		  (setq end-of-range (overlay-end mouse-drag-overlay))))))))))
       (if (consp event)
 	  (let ((fun (key-binding (vector (car event)))))
 	    ;; Run the binding of the terminating up-event, if possible.