aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/mouse.el15
2 files changed, 14 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a016032e285..845c666bc8b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12012-06-13 Chong Yidong <cyd@gnu.org>
2
3 * mouse.el (mouse-drag-track): Do not set the mark if the user
4 releases the mouse without selecting anything (Bug#11588).
5
12012-06-13 Stefan Monnier <monnier@iro.umontreal.ca> 62012-06-13 Stefan Monnier <monnier@iro.umontreal.ca>
2 7
3 * textmodes/tex-mode.el (latex-indent): Recognize tex-verbatim at EOB 8 * textmodes/tex-mode.el (latex-indent): Recognize tex-verbatim at EOB
diff --git a/lisp/mouse.el b/lisp/mouse.el
index f40a0199525..fb2e67408bd 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -805,7 +805,7 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by
805 ;; when setting point near the right fringe (but see below). 805 ;; when setting point near the right fringe (but see below).
806 (auto-hscroll-mode-saved auto-hscroll-mode) 806 (auto-hscroll-mode-saved auto-hscroll-mode)
807 (auto-hscroll-mode nil) 807 (auto-hscroll-mode nil)
808 event end end-point) 808 moved-off-start event end end-point)
809 809
810 (setq mouse-selection-click-count click-count) 810 (setq mouse-selection-click-count click-count)
811 ;; In case the down click is in the middle of some intangible text, 811 ;; In case the down click is in the middle of some intangible text,
@@ -840,6 +840,9 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by
840 (redisplay)) 840 (redisplay))
841 (setq end (event-end event) 841 (setq end (event-end event)
842 end-point (posn-point end)) 842 end-point (posn-point end))
843 ;; Note whether the mouse has left the starting position.
844 (unless (eq end-point start-point)
845 (setq moved-off-start t))
843 (if (and (eq (posn-window end) start-window) 846 (if (and (eq (posn-window end) start-window)
844 (integer-or-marker-p end-point)) 847 (integer-or-marker-p end-point))
845 (mouse--drag-set-mark-and-point start-point 848 (mouse--drag-set-mark-and-point start-point
@@ -880,11 +883,11 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by
880 (let (deactivate-mark) 883 (let (deactivate-mark)
881 (copy-region-as-kill (mark) (point))))) 884 (copy-region-as-kill (mark) (point)))))
882 885
883 ;; If point hasn't moved, run the binding of the 886 ;; Otherwise, run binding of terminating up-event.
884 ;; terminating up-event. 887 (cond
885 (if do-multi-click 888 (do-multi-click (goto-char start-point))
886 (goto-char start-point) 889 (moved-off-start (deactivate-mark))
887 (deactivate-mark)) 890 (t (pop-mark)))
888 (when (and (functionp fun) 891 (when (and (functionp fun)
889 (= start-hscroll (window-hscroll start-window)) 892 (= start-hscroll (window-hscroll start-window))
890 ;; Don't run the up-event handler if the window 893 ;; Don't run the up-event handler if the window