changeset 10369:1b6d44607114

(mouse-drag-region): As once in the past, call the binding of the terminating event.
author Richard M. Stallman <rms@gnu.org>
date Mon, 09 Jan 1995 18:27:32 +0000
parents d74ab0c19706
children 4b1c8dc724e6
files lisp/mouse.el
diffstat 1 files changed, 10 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mouse.el	Mon Jan 09 09:47:15 1995 +0000
+++ b/lisp/mouse.el	Mon Jan 09 18:27:32 1995 +0000
@@ -413,20 +413,17 @@
 		  (mouse-scroll-subr start-window (1+ (- mouse-row bottom))
 				     mouse-drag-overlay start-point)))))))))
       (if (consp event)
-;;; When we scroll into the mode line or menu bar, or out of the window,
-;;; we get events that don't fit these criteria.
-;;;	       (eq (get (event-basic-type event) 'event-kind) 'mouse-click)
-;;;	       (eq (posn-window (event-end event)) start-window)
-;;;	       (numberp (posn-point (event-end event)))
 	  (let ((fun (key-binding (vector (car event)))))
-	    (if (not (= (overlay-start mouse-drag-overlay)
-			(overlay-end mouse-drag-overlay)))
-		(let (last-command this-command)
-		  (push-mark (overlay-start mouse-drag-overlay) t t)
-		  (goto-char (overlay-end mouse-drag-overlay))
-		  (copy-region-as-kill (point) (mark t)))
-	      (goto-char (overlay-end mouse-drag-overlay))
-	      (setq this-command 'mouse-set-point))))
+	    (if (fboundp fun)
+		(funcall fun event)
+	      (if (not (= (overlay-start mouse-drag-overlay)
+			  (overlay-end mouse-drag-overlay)))
+		  (let (last-command this-command)
+		    (push-mark (overlay-start mouse-drag-overlay) t t)
+		    (goto-char (overlay-end mouse-drag-overlay))
+		    (copy-region-as-kill (point) (mark t)))
+		(goto-char (overlay-end mouse-drag-overlay))
+		(setq this-command 'mouse-set-point)))))
       (delete-overlay mouse-drag-overlay))))
 
 ;; Commands to handle xterm-style multiple clicks.