From: Chong Yidong Date: Tue, 7 Aug 2012 03:24:35 +0000 (+0800) Subject: Backport 2012-06-23T12:48:24Z!cyd@gnu.org from trunk X-Git-Tag: emacs-24.2~32 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=de655540a92d18984ece661ee8f6000538749ab3;p=emacs.git Backport 2012-06-23T12:48:24Z!cyd@gnu.org from trunk --- 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