diff options
author | Chong Yidong <cyd@gnu.org> | 2012-08-07 11:24:35 +0800 |
---|---|---|
committer | Chong Yidong <cyd@gnu.org> | 2012-08-07 11:24:35 +0800 |
commit | de655540a92d18984ece661ee8f6000538749ab3 (patch) | |
tree | 2261284c5c66629bbbce8e4f129863f49f81e872 /lisp | |
parent | 5a4c42ba3066ef7403af30c404fbc4ab881e2573 (diff) | |
download | emacs-de655540a92d18984ece661ee8f6000538749ab3.tar.gz |
Backport 2012-06-23T12:48:24Z!cyd@gnu.org from trunk
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 4 | ||||
-rw-r--r-- | 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 <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 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 |