From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 24030@debbugs.gnu.org, Alex <agrambot@gmail.com>
Subject: bug#24030: 25.0.95; mouse-drag-region regression
Date: Sat, 23 Jul 2016 13:17:09 -0400 [thread overview]
Message-ID: <jwva8h847kq.fsf-monnier+bug#24030@gnu.org> (raw)
In-Reply-To: <83twfgv76y.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 23 Jul 2016 16:02:13 +0300")
> 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))
next prev parent reply other threads:[~2016-07-23 17:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-19 22:11 bug#24030: 25.0.95; mouse-drag-region regression Alex
2016-07-20 14:40 ` Eli Zaretskii
2016-07-22 6:09 ` Alex
2016-07-23 13:02 ` Eli Zaretskii
2016-07-23 17:17 ` Stefan Monnier [this message]
2016-07-23 17:56 ` Eli Zaretskii
2016-07-23 21:16 ` Stefan Monnier
2016-07-24 14:12 ` Eli Zaretskii
2016-07-24 15:02 ` Stefan Monnier
2016-07-24 15:17 ` Eli Zaretskii
2016-07-24 20:16 ` Stefan Monnier
2016-07-30 8:33 ` Eli Zaretskii
2016-07-24 17:33 ` Alex
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='jwva8h847kq.fsf-monnier+bug#24030@gnu.org' \
--to=monnier@iro.umontreal.ca \
--cc=24030@debbugs.gnu.org \
--cc=agrambot@gmail.com \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.