From 3617aa76fcfd1ac96e6888867ab438587df1753f Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 23 Sep 1996 17:44:50 +0000 Subject: [PATCH] (mouse-drag-region): Ignore event end-point if it is not a number. --- lisp/mouse.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/mouse.el b/lisp/mouse.el index 8da7095bada..ef41a38caad 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -524,7 +524,7 @@ remains active. Otherwise, it remains until the next input event." nil (setq end (event-end event) end-point (posn-point end)) - (if end-point + (if (numberp end-point) (setq last-end-point end-point)) (cond @@ -574,7 +574,10 @@ remains active. Otherwise, it remains until the next input event." (cons event unread-command-events))) (if (not (= (overlay-start mouse-drag-overlay) (overlay-end mouse-drag-overlay))) - (let* ((stop-point (or (posn-point (event-end event)) last-end-point)) + (let* ((stop-point + (if (numberp (posn-point (event-end event))) + (posn-point (event-end event)) + last-end-point)) ;; The end that comes from where we ended the drag. ;; Point goes here. (region-termination -- 2.39.5