From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie 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: Sun, 24 Dec 2017 08:43:48 +0000 Message-ID: <20171224084348.GA8145@ACM> 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; charset=us-ascii X-Trace: blaine.gmane.org 1514105057 8643 195.159.176.226 (24 Dec 2017 08:44:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 24 Dec 2017 08:44:17 +0000 (UTC) User-Agent: Mutt/1.7.2 (2016-11-26) Cc: 29478@debbugs.gnu.org, npostavs@users.sourceforge.net To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 24 09:44:13 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 1eT1tA-0001dR-0G for geb-bug-gnu-emacs@m.gmane.org; Sun, 24 Dec 2017 09:44:08 +0100 Original-Received: from localhost ([::1]:38691 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eT1v8-0000te-63 for geb-bug-gnu-emacs@m.gmane.org; Sun, 24 Dec 2017 03:46:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56360) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eT1v1-0000t2-Fy for bug-gnu-emacs@gnu.org; Sun, 24 Dec 2017 03:46:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eT1v0-00082O-HL for bug-gnu-emacs@gnu.org; Sun, 24 Dec 2017 03:46:03 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41221) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eT1v0-00081z-DX for bug-gnu-emacs@gnu.org; Sun, 24 Dec 2017 03:46:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eT1v0-0005Fj-0h for bug-gnu-emacs@gnu.org; Sun, 24 Dec 2017 03:46:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Dec 2017 08:46:01 +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.151410515720176 (code B ref 29478); Sun, 24 Dec 2017 08:46:01 +0000 Original-Received: (at 29478) by debbugs.gnu.org; 24 Dec 2017 08:45:57 +0000 Original-Received: from localhost ([127.0.0.1]:49902 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eT1uv-0005FM-5L for submit@debbugs.gnu.org; Sun, 24 Dec 2017 03:45:57 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:60314 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1eT1ut-0005FC-0P for 29478@debbugs.gnu.org; Sun, 24 Dec 2017 03:45:55 -0500 Original-Received: (qmail 15934 invoked by uid 3782); 24 Dec 2017 08:45:53 -0000 Original-Received: from acm.muc.de (p548C62B1.dip0.t-ipconnect.de [84.140.98.177]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 24 Dec 2017 09:45:52 +0100 Original-Received: (qmail 8501 invoked by uid 1000); 24 Dec 2017 08:43:48 -0000 Content-Disposition: inline In-Reply-To: X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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:141446 Archived-At: Hello, Andreas. On Sat, Dec 23, 2017 at 15:48:38 +0100, Andreas Schwab wrote: > 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. Yes, it can. Thanks! I've amended the function accordingly. > 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." -- Alan Mackenzie (Nuremberg, Germany).