From: Eli Zaretskii <eliz@gnu.org>
To: Alex <agrambot@gmail.com>, Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 24030@debbugs.gnu.org
Subject: bug#24030: 25.0.95; mouse-drag-region regression
Date: Sat, 23 Jul 2016 16:02:13 +0300 [thread overview]
Message-ID: <83twfgv76y.fsf@gnu.org> (raw)
In-Reply-To: <871t2mw6el.fsf@gmail.com> (message from Alex on Fri, 22 Jul 2016 00:09:22 -0600)
> From: Alex <agrambot@gmail.com>
> Cc: 24030@debbugs.gnu.org
> Date: Fri, 22 Jul 2016 00:09:22 -0600
>
> > And mark-active is nil because some code
> > that I was unable to track down sets deactivate-mark to non-nil, so
> > the command loop deactivates the mark.
>
> It appears that it's somewhere within select-window or something it
> calls. After posn-set-point calls select-window in 24.5, deactivate-mark
> is nil -- but it's t in 25.1.
>
> #+BEGIN_SRC elisp
> (defun test ()
> (message "before: %s" deactivate-mark)
> (select-window (cadr (window-list)))
> (message "after: %s" deactivate-mark))
> #+END_SRC
>
> In the case where the target window contains the new help buffer,
> deactivate-mark will be nil in 24.5 and t in 25.1.
Thanks.
The reason for the above is that in Emacs 25 deactivate-mark was made
a variable that becomes buffer-local when set. And inserting text
into a buffer, which happens when describe-function inserts the
documentation into *Help*, was made to set the this variable in a way
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.
I think the problem is that the command loop fails to reset the
buffer-local value of this variable, so we must add something to
keyboard.c, where the global value is reset after each command.
I'm CC'ing Stefan, who made the above-mentioned changes, in the hope
that he will have some ideas for how to fix this regression.
next prev parent reply other threads:[~2016-07-23 13:02 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 [this message]
2016-07-23 17:17 ` Stefan Monnier
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=83twfgv76y.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=24030@debbugs.gnu.org \
--cc=agrambot@gmail.com \
--cc=monnier@iro.umontreal.ca \
/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.