(mouse-drag-track): Reset transient-mark-mode to nil
authorMartin Rudalics <rudalics@gmx.at>
Sun, 15 Jul 2007 08:31:26 +0000 (08:31 +0000)
committerMartin Rudalics <rudalics@gmx.at>
Sun, 15 Jul 2007 08:31:26 +0000 (08:31 +0000)
when handling the terminating event.

lisp/ChangeLog
lisp/mouse.el

index 0faca7d..a18a61f 100644 (file)
@@ -1,3 +1,8 @@
+2007-07-15  Martin Rudalics  <rudalics@gmx.at>
+
+       * mouse.el (mouse-drag-track): Reset transient-mark-mode to nil
+       when handling the terminating event.
+
 2007-07-15  Jeff Miller  <jmiller@cablespeed.com>  (tiny change)
 
        * calendar/cal-bahai.el (calendar-goto-bahai-date): Add autoload
index 27b32e9..5577b94 100644 (file)
@@ -1013,6 +1013,11 @@ should only be used by mouse-drag-region."
                              (overlay-start mouse-drag-overlay))
                           region-termination))
                       last-command this-command)
+                 (when (eq transient-mark-mode 'identity)
+                   ;; Reset `transient-mark-mode' to avoid expanding the region
+                   ;; while scrolling (compare thread on "Erroneous selection
+                   ;; extension ..." on bug-gnu-emacs from 2007-06-10).
+                   (setq transient-mark-mode nil))
                  (push-mark region-commencement t t)
                  (goto-char region-termination)
                  (if (not do-mouse-drag-region-post-process)