[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24030: 25.0.95; mouse-drag-region regression
From: |
Stefan Monnier |
Subject: |
bug#24030: 25.0.95; mouse-drag-region regression |
Date: |
Sat, 23 Jul 2016 13:17:09 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
> that creates a buffer-local binding for it. That is why select-window
> gives deactivate-mark a non-nil value: select-window makes the
> window's buffer the current one, which assigns buffer-local values to
> all of it variables, including deactivate-mark. Then this
> buffer-local value is being examined by mouse-drag-region.
Indeed, this is a problem here because of have a "stale" setting of
deactivate-mark.
Maybe something like the patch below will do?
Another option is to make the deactivate-mark function reset
deactivate-mark to nil (which would seem to make a lot of sense in
itself) and then to call deactivate-mark at that point or to move the
earlier deactivate-mark to after mouse-set-point.
Of course, maybe there should be a more thorough handling of stale
deactivate-mark settings. IOW change all places that set
deactivate-mark to non-nil so they also record the affected buffer and
then change the command loop so that it calls deactivate-mark in all
those buffers where deactivate-mark was set as non-nil.
Stefan
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 27f2acb..6175d77 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -811,6 +811,7 @@ mouse-drag-track
;; window, now let's jump to the place of the event, where things
;; are happening.
(_ (mouse-set-point start-event))
+ (_ (kill-local-variable 'deactivate-mark))
(echo-keystrokes 0)
(start-posn (event-start start-event))
(start-point (posn-point start-posn))
- bug#24030: 25.0.95; mouse-drag-region regression, Alex, 2016/07/19
- bug#24030: 25.0.95; mouse-drag-region regression, Eli Zaretskii, 2016/07/20
- bug#24030: 25.0.95; mouse-drag-region regression, Alex, 2016/07/22
- bug#24030: 25.0.95; mouse-drag-region regression, Eli Zaretskii, 2016/07/23
- bug#24030: 25.0.95; mouse-drag-region regression,
Stefan Monnier <=
- bug#24030: 25.0.95; mouse-drag-region regression, Eli Zaretskii, 2016/07/23
- bug#24030: 25.0.95; mouse-drag-region regression, Stefan Monnier, 2016/07/23
- bug#24030: 25.0.95; mouse-drag-region regression, Eli Zaretskii, 2016/07/24
- bug#24030: 25.0.95; mouse-drag-region regression, Stefan Monnier, 2016/07/24
- bug#24030: 25.0.95; mouse-drag-region regression, Eli Zaretskii, 2016/07/24
- bug#24030: 25.0.95; mouse-drag-region regression, Stefan Monnier, 2016/07/24
- bug#24030: 25.0.95; mouse-drag-region regression, Eli Zaretskii, 2016/07/30
- bug#24030: 25.0.95; mouse-drag-region regression, Alex, 2016/07/24