unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 24755-done@debbugs.gnu.org, Mats Palmgren <matspal@gmail.com>
Subject: bug#24755: 25.1; Selection continues with no mouse button pressed
Date: Wed, 26 Oct 2016 15:29:55 -0400	[thread overview]
Message-ID: <jwvy41a7w8c.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <83inskrbz5.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 22 Oct 2016 12:04:30 +0300")

> Stefan, could you please fix this?  It seems to be due to changes in
> how mouse-drag-track handles mouse events: in Emacs 24.5, the code
> handled mouse clicks as well, whereas now it doesn't seem to.  So
> releasing the mouse button while Ctrl or Shift is pressed signals an
> error now, instead of finishing the drag event.

> The fix should go to the emacs-25 branch.

I pushed the patch below to emacs-25, which should fix it.


        Stefan


diff --git a/lisp/subr.el b/lisp/subr.el
index 573f238..07909b8 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -4507,8 +4507,10 @@ set-transient-map
                         ;; exit C-u.
                         t)
                        ((eq t keep-pred)
-                        (eq this-command
-                            (lookup-key map (this-command-keys-vector))))
+                        (let ((mc (lookup-key map (this-command-keys-vector))))
+                          ;; If the key is unbound `this-command` is
+                          ;; nil and so is `mc`.
+                          (and mc (eq this-command mc))))
                        (t (funcall keep-pred)))
                 (funcall exitfun)))))
     (add-hook 'pre-command-hook clearfun)





  reply	other threads:[~2016-10-26 19:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-21 14:56 bug#24755: 25.1; Selection continues with no mouse button pressed Mats Palmgren
2016-10-22  9:04 ` Eli Zaretskii
2016-10-26 19:29   ` Stefan Monnier [this message]
2016-10-26 19:52     ` Eli Zaretskii
2016-10-26 20:13       ` Stefan Monnier
2016-10-26 20:22       ` Mats Palmgren
2016-10-26 20:27         ` Stefan Monnier
2016-10-26 21:25           ` Mats Palmgren

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvy41a7w8c.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=24755-done@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=matspal@gmail.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).