From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Colin Baxter Newsgroups: gmane.emacs.bugs Subject: bug#30955: 27.0.50; Mouse clicks on header-line in Info are broken Date: Wed, 28 Mar 2018 07:07:47 +0100 Message-ID: <87po3opwb0.fsf@yandex.com> References: <83po3qga5g.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1522217172 15452 195.159.176.226 (28 Mar 2018 06:06:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 28 Mar 2018 06:06:12 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) Cc: , monnier@IRO.UMontreal.CA To: 30955@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 28 08:06:08 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 1f14Dj-0003sD-Ri for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Mar 2018 08:06:04 +0200 Original-Received: from localhost ([::1]:37566 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f14Fm-0003JD-U2 for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Mar 2018 02:08:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f14Ff-0003Iz-9C for bug-gnu-emacs@gnu.org; Wed, 28 Mar 2018 02:08:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f14Fe-0003KV-9G for bug-gnu-emacs@gnu.org; Wed, 28 Mar 2018 02:08:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48603) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f14Fe-0003KG-57 for bug-gnu-emacs@gnu.org; Wed, 28 Mar 2018 02:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f14Fd-0008Rh-Ul for bug-gnu-emacs@gnu.org; Wed, 28 Mar 2018 02:08:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Colin Baxter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Mar 2018 06:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30955 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30955-submit@debbugs.gnu.org id=B30955.152221728132458 (code B ref 30955); Wed, 28 Mar 2018 06:08:01 +0000 Original-Received: (at 30955) by debbugs.gnu.org; 28 Mar 2018 06:08:01 +0000 Original-Received: from localhost ([127.0.0.1]:56500 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f14Fc-0008RS-La for submit@debbugs.gnu.org; Wed, 28 Mar 2018 02:08:00 -0400 Original-Received: from forward105o.mail.yandex.net ([37.140.190.183]:39988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f14FZ-0008RC-1i for 30955@debbugs.gnu.org; Wed, 28 Mar 2018 02:07:58 -0400 Original-Received: from mxback14g.mail.yandex.net (mxback14g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:93]) by forward105o.mail.yandex.net (Yandex) with ESMTP id 699B444469DD; Wed, 28 Mar 2018 09:07:50 +0300 (MSK) Original-Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback14g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id nHIUs0ZJO3-7no8XjmG; Wed, 28 Mar 2018 09:07:50 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1522217270; bh=WbZBpoLHqM68jRdf09gJ3cra+FRagxlsz0mkv/vKZkE=; h=From:To:Cc:Cc:Subject:References:Date:In-Reply-To:Message-ID; b=sXHuSqeE+h1dQOnlHi/4l7cE8F8JSd9z2ocYi5LgQE3IpJdrLmzDOIayT45vVQeDq 9nokLnoK0CfCwtV4QP3VuxjUGY0cGhvt6yXElDuVDObRncEsdFiFBXFY5sTOp/M6mK fgpPQfZ7ss/NcUrfoA12OVERIT4VnZNdElSgrhds= Original-Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id dEUVy35Q5Y-7m44iqNO; Wed, 28 Mar 2018 09:07:48 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1522217268; bh=WbZBpoLHqM68jRdf09gJ3cra+FRagxlsz0mkv/vKZkE=; h=From:To:Cc:Cc:Subject:References:Date:In-Reply-To:Message-ID; b=szipFV2fU7WiRsUZoSa5k73GGxquVrO7R64g+GbWvUeH2KUbrtDUFZWO0q6i+H+4b 0egA1MPBwKIMPJsduyedTMxIaAXsjE+g+UYPMTezNbnL6LejfLN89jDKGcicnqChIw 3TXIrnwFVMq3+sF0SrSO0y5Ta0W9FHZYojdAUu/Q= Authentication-Results: smtp3p.mail.yandex.net; dkim=pass header.i=@yandex.com X-Face: -P+89ASh_wrs;AUGm`!l[}/o-lyK}5W.gq\fkJ{#d6Gu,hWrZNz::iMm5PJb} __A96]-LUrl)X=uF=V|\3-\9/sXvBs/H Mail-Copies-To: baxloc@gmx.com In-Reply-To: (Stefan Monnier's message of "Tue, 27 Mar 2018 15:27:10 -0400") Face: iVBORw0KGgoAAAANSUhEUgAAACwAAAAMCAIAAACWSshgAAAABmJLR0QA/wD/AP+gvaeTAAAA nklEQVQ4je2UsQ7CMAxEH8gVNOXP+F7m/hQDadyYBbbLUllM3HiSL0/2Kad15XxG6Ml0V/5RtQfc hN87VgpmaigyCYDLoiHcsXlmmtTQngxBgSLs1pCX+LWsNUJufst+atOZ7pj7YGbkH5brTHcsYrCJ 7GISOjMCK2VQzJ4NscAi7H8xv/oUU0O0bIimM/cdq3XwbVeuqQyvCqp8vfMGDDxBfU8Ud+cAAAAA SUVORK5CYII= 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:144664 Archived-At: >>>>> Stefan Monnier writes: >> Stefan "not looking forward to debug sessions in >> read_key_sequence" > Ha, I found the sucker! Installed, > Stefan > --- a/src/keyboard.c +++ b/src/keyboard.c @@ -8701,10 +8701,19 @@ > follow_key (Lisp_Object keymap, Lisp_Object key) } > static Lisp_Object -active_maps (Lisp_Object first_event) > +active_maps (Lisp_Object first_event, Lisp_Object second_event) { > Lisp_Object position - = CONSP (first_event) ? CAR_SAFE (XCDR > (first_event)) : Qnil; + = EVENT_HAS_PARAMETERS (first_event) ? > EVENT_START (first_event) : Qnil; + /* The position of a click can > be in the second event if the first event + is a pseudo-event like > `header-line` or `mode-line`. */ + if (SYMBOLP (first_event) + && > EVENT_HAS_PARAMETERS (second_event) + && EQ (first_event, > POSN_POSN (EVENT_START (second_event)))) + { + eassert (NILP > (position)); + position = EVENT_START (second_event); + } return > Fcons (Qkeymap, Fcurrent_active_maps (Qt, position)); } > @@ -9016,13 +9025,14 @@ read_key_sequence (Lisp_Object *keybuf, > int bufsize, Lisp_Object prompt, starting_buffer = current_buffer; > first_unbound = bufsize + 1; Lisp_Object first_event = mock_input > > 0 ? keybuf[0] : Qnil; + Lisp_Object second_event = mock_input > > 1 ? keybuf[1] : Qnil; > /* Build our list of keymaps. If we recognize a function key > and replace its escape sequence in keybuf with its symbol, or if > the sequence starts with a mouse click and we need to switch > buffers, we jump back here to rebuild the initial keymaps from the > current buffer. */ - current_binding = active_maps (first_event); > + current_binding = active_maps (first_event, second_event); > /* Start from the beginning in keybuf. */ t = 0; @@ -9282,7 > +9292,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, > Lisp_Object prompt, && (XBUFFER (XWINDOW > (selected_window)->contents) != current_buffer)) Fset_buffer > (XWINDOW (selected_window)->contents); - current_binding = > active_maps (first_event); + current_binding = active_maps > (first_event, Qnil); } > GROW_RAW_KEYBUF; Yes, that's fixed the issue for me - mouse now works normally. Thank you. Best wishes, Colin.