From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#24755: 25.1; Selection continues with no mouse button pressed Date: Wed, 26 Oct 2016 15:29:55 -0400 Message-ID: References: <4bcf2767-b3e7-05dd-8ef5-80b8af60ca7a@gmail.com> <83inskrbz5.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1477510294 5400 195.159.176.226 (26 Oct 2016 19:31:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 26 Oct 2016 19:31:34 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) Cc: 24755-done@debbugs.gnu.org, Mats Palmgren To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 26 21:31:29 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzTup-00077P-74 for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 Oct 2016 21:31:11 +0200 Original-Received: from localhost ([::1]:37099 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzTur-000625-MG for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 Oct 2016 15:31:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38048) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzTuk-00060k-Ve for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2016 15:31:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bzTuh-00021I-45 for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2016 15:31:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42491) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bzTuh-000218-0H for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2016 15:31:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bzTug-0006K2-M7 for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2016 15:31:02 -0400 Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Oct 2016 19:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 24755 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 24755@debbugs.gnu.org, monnier@iro.umontreal.ca, matspal@gmail.com Original-Received: via spool by 24755-done@debbugs.gnu.org id=D24755.147751020624227 (code D ref 24755); Wed, 26 Oct 2016 19:31:02 +0000 Original-Received: (at 24755-done) by debbugs.gnu.org; 26 Oct 2016 19:30:06 +0000 Original-Received: from localhost ([127.0.0.1]:57888 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzTtm-0006Ih-1E for submit@debbugs.gnu.org; Wed, 26 Oct 2016 15:30:06 -0400 Original-Received: from alt34.smtp-out.videotron.ca ([24.53.0.23]:5424) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzTtk-0006Gy-4p for 24755-done@debbugs.gnu.org; Wed, 26 Oct 2016 15:30:04 -0400 Original-Received: from ceviche.home ([24.202.159.173]) by Videotron with SMTP id zTtbbQOTFYOXTzTtdbxa08; Wed, 26 Oct 2016 15:29:58 -0400 X-Authority-Analysis: v=2.1 cv=Gfm35VjL c=1 sm=1 tr=0 a=drQ1+/MlVPSpi4JwKQuNfg==:117 a=drQ1+/MlVPSpi4JwKQuNfg==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=CH0kA5CcgfcA:10 a=hRNPX90jC2tJLIyZDqwA:9 Original-Received: by ceviche.home (Postfix, from userid 20848) id CE62566239; Wed, 26 Oct 2016 15:29:55 -0400 (EDT) In-Reply-To: <83inskrbz5.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 22 Oct 2016 12:04:30 +0300") X-CMAE-Envelope: MS4wfMzVo31IKyva8mgbRhkvV1JgK2/lhirEV3Kc+1vzrgOEbELvo/Zxg9Su9vzkNIqIqWDujer1yx22fCNQhmOgdAGvg5FgBPUd0tM+7JqX19Cpz0XAIJ4J YoN5IJfbE7RjwlesLWAnIZfQJTS1bb8CVKXvLwVPvh7aCTIEofVUkdC0eFq86E9sL/iCADdWDnlFxvgsDYaW1EZtzsAmJEjg98AHT5NQLOShyEdST0lL32VT HTmv3CwSVZ6uQKL080eZVgLZuTujYL512W8YH4gR4+o= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:125045 Archived-At: > 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)