From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.bugs Subject: bug#29478: [Patch 2]: bug#29478: 26.0.90; `C-h k' followed by mouse clicks no longer shows down event Date: Sat, 23 Dec 2017 15:48:38 +0100 Message-ID: References: <1b3879d6-f14e-47b0-970f-baf09598fcfd@default> <871skjnpd8.fsf@users.sourceforge.net> <20171128221036.GC14868@ACM> <83o9ni3l3i.fsf@gnu.org> <20171223142809.GB6618@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1514040445 12813 195.159.176.226 (23 Dec 2017 14:47:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 23 Dec 2017 14:47:25 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) Cc: 29478@debbugs.gnu.org, npostavs@users.sourceforge.net To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 23 15:47:21 2017 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 1eSl50-0002ZY-6M for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Dec 2017 15:47:14 +0100 Original-Received: from localhost ([::1]:42218 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eSl6y-0004un-I2 for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Dec 2017 09:49:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47444) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eSl6o-0004tC-Cp for bug-gnu-emacs@gnu.org; Sat, 23 Dec 2017 09:49:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eSl6l-0001Nn-8O for bug-gnu-emacs@gnu.org; Sat, 23 Dec 2017 09:49:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40158) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eSl6l-0001N9-4l for bug-gnu-emacs@gnu.org; Sat, 23 Dec 2017 09:49:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eSl6k-0002PF-EM for bug-gnu-emacs@gnu.org; Sat, 23 Dec 2017 09:49:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andreas Schwab Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Dec 2017 14:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29478 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 29478-submit@debbugs.gnu.org id=B29478.15140405309231 (code B ref 29478); Sat, 23 Dec 2017 14:49:02 +0000 Original-Received: (at 29478) by debbugs.gnu.org; 23 Dec 2017 14:48:50 +0000 Original-Received: from localhost ([127.0.0.1]:48839 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eSl6X-0002Oo-Nc for submit@debbugs.gnu.org; Sat, 23 Dec 2017 09:48:49 -0500 Original-Received: from mail-out.m-online.net ([212.18.0.10]:44511) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eSl6T-0002Od-As for 29478@debbugs.gnu.org; Sat, 23 Dec 2017 09:48:46 -0500 Original-Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3z3pCw17Z6z1qtXF; Sat, 23 Dec 2017 15:48:43 +0100 (CET) Original-Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 3z3pCv1xKVz1qsvR; Sat, 23 Dec 2017 15:48:43 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Original-Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id caXq7vvaYNGu; Sat, 23 Dec 2017 15:48:42 +0100 (CET) X-Auth-Info: fWjGTK/uunv3jr+ylFuSEd4Gq3inwy063Brfosb2ElXT9JMOoyPUiOgIZBBKc4SZ Original-Received: from linux.local (p4FE4D439.dip0.t-ipconnect.de [79.228.212.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Sat, 23 Dec 2017 15:48:42 +0100 (CET) Original-Received: by linux.local (Postfix, from userid 501) id 6B85D1E580A; Sat, 23 Dec 2017 15:48:38 +0100 (CET) X-Yow: .. Do you like ``TENDER VITTLES?''? In-Reply-To: <20171223142809.GB6618@ACM> (Alan Mackenzie's message of "Sat, 23 Dec 2017 14:28:09 +0000") 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:141427 Archived-At: On Dez 23 2017, Alan Mackenzie wrote: > @@ -769,6 +773,28 @@ help-read-key-sequence > (setq yank-menu (copy-sequence saved-yank-menu)) > (fset 'yank-menu (cons 'keymap yank-menu)))))) > > +(defun help-downify-mouse-event-type (base) > + "Add \"down-\" to BASE if it is not already there. > +BASE is a symbol, a mouse event type. If the modification is done, > +return the new symbol. Otherwise return nil." > + (let ((base-s (symbol-name base))) > + ;; Note: the order of the components in the following string is > + ;; determined by `apply_modifiers_uncached' in src/keyboard.c. > + (string-match "\\(A-\\)?\ > +\\(C-\\)?\ > +\\(H-\\)?\ > +\\(M-\\)?\ > +\\(S-\\)?\ > +\\(s-\\)?\ > +\\(double-\\)?\ > +\\(triple-\\)?\ > +\\(up-\\)?\ > +\\(\\(down-\\)?\\)\ > +\\(\\(drag-\\)?\\)" base-s) > + (when (and (zerop (length (match-string 10 base-s))) ; "down-" > + (zerop (length (match-string 12 base-s)))) ; "drag-" A group that didn't match can be detected by match-string (or match-beginning) returning nil. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."