From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#29478: [Patch] bug#29478: 26.0.90; `C-h k' followed by mouse clicks no longer shows down event Date: Sat, 27 Jan 2018 10:28:30 +0200 Message-ID: <83shark8nl.fsf@gnu.org> References: <20171128221036.GC14868@ACM> <83o9ni3l3i.fsf@gnu.org> <83bmji2xye.fsf@gnu.org> <83tvwzubez.fsf@gnu.org> <20171222220549.GC8072@ACM> <833741lr0t.fsf@gnu.org> <20171223111726.GA6618@ACM> <20171223210407.GC6618@ACM> <831sjcfq1v.fsf@gnu.org> <83zi5q997a.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1517041652 26887 195.159.176.226 (27 Jan 2018 08:27:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 27 Jan 2018 08:27:32 +0000 (UTC) Cc: acm@muc.de, 29478@debbugs.gnu.org, npostavs@users.sourceforge.net To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 27 09:27:27 2018 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 1efLpW-0006HK-OR for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Jan 2018 09:27:18 +0100 Original-Received: from localhost ([::1]:34363 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1efLrX-0007N3-Br for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Jan 2018 03:29:23 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33818) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1efLrF-0007FY-0G for bug-gnu-emacs@gnu.org; Sat, 27 Jan 2018 03:29:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1efLrB-0007D1-Sg for bug-gnu-emacs@gnu.org; Sat, 27 Jan 2018 03:29:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36425) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1efLrB-0007Cx-OR for bug-gnu-emacs@gnu.org; Sat, 27 Jan 2018 03:29:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1efLrB-0007cy-Ib for bug-gnu-emacs@gnu.org; Sat, 27 Jan 2018 03:29:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Jan 2018 08:29: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.151704173129297 (code B ref 29478); Sat, 27 Jan 2018 08:29:01 +0000 Original-Received: (at 29478) by debbugs.gnu.org; 27 Jan 2018 08:28:51 +0000 Original-Received: from localhost ([127.0.0.1]:44322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1efLr0-0007cS-4z for submit@debbugs.gnu.org; Sat, 27 Jan 2018 03:28:50 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:42770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1efLqy-0007cG-8A for 29478@debbugs.gnu.org; Sat, 27 Jan 2018 03:28:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1efLqq-00075X-1T for 29478@debbugs.gnu.org; Sat, 27 Jan 2018 03:28:43 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50506) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1efLqg-000727-5m; Sat, 27 Jan 2018 03:28:30 -0500 Original-Received: from [176.228.60.248] (port=2324 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1efLqf-0007Me-F2; Sat, 27 Jan 2018 03:28:29 -0500 In-reply-to: (message from Stefan Monnier on Fri, 26 Jan 2018 17:37:22 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:142572 Archived-At: > From: Stefan Monnier > Cc: acm@muc.de, 29478@debbugs.gnu.org, npostavs@users.sourceforge.net > Date: Fri, 26 Jan 2018 17:37:22 -0500 > > >>> If you want a patch that applies, the one below should work. > >> Thanks. It needs some more work. E.g., "C-h k C-mouse-1" signals an > >> error: > >> help-fns--analyze-function: Symbol’s function definition is void: nil > > The patch below fixes this... > > Sorry, wrong patch! > > I meant this one, > > > Stefan > > > diff --git a/lisp/help.el b/lisp/help.el > index 014af5141e..1f92c38927 100644 > --- a/lisp/help.el > +++ b/lisp/help.el > @@ -1,4 +1,4 @@ > -;;; help.el --- help commands for Emacs > +;;; help.el --- help commands for Emacs -*- lexical-binding:t -*- > > ;; Copyright (C) 1985-1986, 1993-1994, 1998-2018 Free Software > ;; Foundation, Inc. > @@ -593,19 +593,26 @@ help-key-description > string > (format "%s (translated from %s)" string otherstring)))))) > > +(defun help--first-event (keyseq) > + (when (> (length keyseq) 0) > + (aref keyseq (if (and (symbolp (aref keyseq 0)) > + (> (length keyseq) 1) > + (consp (aref keyseq 1))) > + ;; Look at the second event when the first > + ;; is a pseudo-event like `mode-line' of `left-fringe'. > + 1 > + 0)))) Should we perhaps test explicitly for pseudo-events, in case some day we have events we don't want to skip? Or maybe have an assertion here, for that future day? > -(defun describe-key-briefly (&optional key insert untranslated) > - "Print the name of the function KEY invokes. KEY is a string. > +(defun describe-key-briefly (key-list &optional insert) > + "Print the name of the functions KEY-LIST invokes. Is it a good idea to change the signature of this function? I'm sure it's used in many places, including outside Emacs. > (defun help-read-key-sequence (&optional no-mouse-movement) > - "Reads a key sequence from the user. > -Returns a list of the form (KEY UP-EVENT), where KEY is the key > -sequence, and UP-EVENT is the up-event that was discarded by > -reading KEY, or nil. > + "Read \"a\" key sequence from the user. Why "a" in quotes? > +Return a list of elements of the form (SEQ . RAW-SEQ), where SEQ is a key > +sequence, and RAW-SEQ is its untranslated form. This also changes the format of the return value in incompatible way, doesn't it? Is this incompatible change justified? > -(defun describe-key (&optional key untranslated up-event) > - "Display documentation of the function invoked by KEY. > -KEY can be any kind of a key sequence; it can include keyboard events, > +(defun describe-key (key-list &optional buffer) > + "Display documentation of the function invoked by KEY-LIST. > +KEY-LIST can be any kind of a key sequence; it can include keyboard events, > mouse events, and/or menu events. When calling from a program, Same issue here. Thanks.