]> git.eshelyaron.com Git - emacs.git/commitdiff
Backport 2012-06-23T12:48:24Z!cyd@gnu.org from trunk
authorChong Yidong <cyd@gnu.org>
Tue, 7 Aug 2012 03:24:35 +0000 (11:24 +0800)
committerChong Yidong <cyd@gnu.org>
Tue, 7 Aug 2012 03:24:35 +0000 (11:24 +0800)
lisp/ChangeLog
lisp/mouse.el

index a4a5ab7eb396eac09165a417b73441f476af31b4..d8bf55e0066629da45bc5da1d02b5aa3113684df 100644 (file)
@@ -1,3 +1,7 @@
+2012-08-07  Chong Yidong  <cyd@gnu.org>
+
+       * mouse.el (mouse-drag-track): Deactivate the mark before popping.
+
 2012-08-06  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * progmodes/cperl-mode.el (cperl-mode): Yet another fix for
index d9511c722ca1631250bec0782203c71dbbbad44a..53238f0352494e86548a8fac69edc1e84dd80a75 100644 (file)
@@ -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