From de655540a92d18984ece661ee8f6000538749ab3 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 7 Aug 2012 11:24:35 +0800 Subject: [PATCH] Backport 2012-06-23T12:48:24Z!cyd@gnu.org from trunk --- lisp/ChangeLog | 4 ++++ lisp/mouse.el | 13 +++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a4a5ab7eb39..d8bf55e0066 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2012-08-07 Chong Yidong + + * mouse.el (mouse-drag-track): Deactivate the mark before popping. + 2012-08-06 Stefan Monnier * progmodes/cperl-mode.el (cperl-mode): Yet another fix for diff --git a/lisp/mouse.el b/lisp/mouse.el index d9511c722ca..53238f03524 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -885,10 +885,15 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by (copy-region-as-kill (mark) (point))))) ;; Otherwise, run binding of terminating up-event. - (cond - (do-multi-click (goto-char start-point)) - (moved-off-start (deactivate-mark)) - (t (pop-mark))) + (setq foo (list (window-buffer (selected-window)) + (current-buffer))) + + (if do-multi-click + (goto-char start-point) + (deactivate-mark) + (unless moved-off-start + (pop-mark))) + (when (and (functionp fun) (= start-hscroll (window-hscroll start-window)) ;; Don't run the up-event handler if the window -- 2.39.2