aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1995-08-13 15:46:10 +0000
committerRichard M. Stallman1995-08-13 15:46:10 +0000
commitc2ef83b42442f1ffd056b9bc312cf355fb2aaaeb (patch)
treeb73a1f1b573adeae1bb9ef1d05fc470b759af914
parent135c9ca6b8791b79c46ac76c6da5c16868c534e2 (diff)
downloademacs-c2ef83b42442f1ffd056b9bc312cf355fb2aaaeb.tar.gz
emacs-c2ef83b42442f1ffd056b9bc312cf355fb2aaaeb.zip
(mouse-drag-region): Unread the up-event rather than execute it here.
-rw-r--r--lisp/mouse.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index a52d0d14213..d70d40d7de5 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -449,12 +449,13 @@ release the mouse button. Otherwise, it does not."
449 ;; In the case of a multiple click, it gives the wrong results, 449 ;; In the case of a multiple click, it gives the wrong results,
450 ;; because it would fail to set up a region. 450 ;; because it would fail to set up a region.
451 (if (and (= (mod mouse-selection-click-count 3) 0) (fboundp fun)) 451 (if (and (= (mod mouse-selection-click-count 3) 0) (fboundp fun))
452 ;; In this case, we can just let the up-event execute normally.
452 (progn 453 (progn
453 (setq this-command fun)
454 ;; Delete the overlay before calling the function, 454 ;; Delete the overlay before calling the function,
455 ;; because delete-overlay increases buffer-modified-tick. 455 ;; because delete-overlay increases buffer-modified-tick.
456 (delete-overlay mouse-drag-overlay) 456 (delete-overlay mouse-drag-overlay)
457 (funcall fun event)) 457 (setq unread-command-events
458 (cons event unread-command-events)))
458 (if (not (= (overlay-start mouse-drag-overlay) 459 (if (not (= (overlay-start mouse-drag-overlay)
459 (overlay-end mouse-drag-overlay))) 460 (overlay-end mouse-drag-overlay)))
460 (let (last-command this-command) 461 (let (last-command this-command)