From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "olaf.rogalsky@t-online.de" Newsgroups: gmane.emacs.bugs Subject: bug#29104: AW: bug#29104: [PATCH]: xterm-mouse-mode clicks in the modeline dont use the keymap properties of the modeline strings Date: Mon, 13 Nov 2017 14:57:54 +0100 (CET) Message-ID: <1510581474048.7762584.ec34b569bff8873067a3b84e08b73b2215d5dd1a@spica.telekom.de> References: <87zi869koz.fsf@t-online.de> <877ev3nf5b.fsf@t-online.de> <83375lp2ti.fsf@gnu.org> Reply-To: "olaf.rogalsky@t-online.de" NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1510581495 9234 195.159.176.226 (13 Nov 2017 13:58:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 13 Nov 2017 13:58:15 +0000 (UTC) Cc: "29104@debbugs.gnu.org" <29104@debbugs.gnu.org> To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 13 14:58:08 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 1eEFFU-0001hA-3t for geb-bug-gnu-emacs@m.gmane.org; Mon, 13 Nov 2017 14:58:04 +0100 Original-Received: from localhost ([::1]:54517 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eEFFZ-0007Ke-F0 for geb-bug-gnu-emacs@m.gmane.org; Mon, 13 Nov 2017 08:58:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43474) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eEFFT-0007KY-7w for bug-gnu-emacs@gnu.org; Mon, 13 Nov 2017 08:58:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eEFFS-0002PY-9T for bug-gnu-emacs@gnu.org; Mon, 13 Nov 2017 08:58:03 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57422) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eEFFS-0002PD-5m for bug-gnu-emacs@gnu.org; Mon, 13 Nov 2017 08:58:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eEFFR-00064o-OB for bug-gnu-emacs@gnu.org; Mon, 13 Nov 2017 08:58:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "olaf.rogalsky@t-online.de" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 13 Nov 2017 13:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29104 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 29104-submit@debbugs.gnu.org id=B29104.151058147923350 (code B ref 29104); Mon, 13 Nov 2017 13:58:01 +0000 Original-Received: (at 29104) by debbugs.gnu.org; 13 Nov 2017 13:57:59 +0000 Original-Received: from localhost ([127.0.0.1]:37870 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEFFP-00064Y-5T for submit@debbugs.gnu.org; Mon, 13 Nov 2017 08:57:59 -0500 Original-Received: from mailout01.t-online.de ([194.25.134.80]:44520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEFFN-00064Q-6G for 29104@debbugs.gnu.org; Mon, 13 Nov 2017 08:57:57 -0500 Original-Received: from fwd07.aul.t-online.de (fwd07.aul.t-online.de [172.20.27.150]) by mailout01.t-online.de (Postfix) with SMTP id EB44742B79F7; Mon, 13 Nov 2017 14:57:54 +0100 (CET) Original-Received: from spica10.aul.t-online.de (Zwe5AyZ6YhNu0py5jvVjLcdh4uAH8ls5dE31dzFb2Yx7QC5UsCACuKJl+Y3Bm0+wR2@[172.20.102.125]) by fwd07.aul.t-online.de with esmtp id 1eEFFK-3fwRXs0; Mon, 13 Nov 2017 14:57:54 +0100 Original-Received: from 217.110.38.73:64857 by cmpweb22.aul.t-online.de with HTTP/1.1 (Lisa V5-0-9-0.14224 on API V5-9-1-0) Original-Received: from 172.20.102.126:51841 by spica10.aul.t-online.de:8080; Mon, 13 Nov 2017 14:57:54 +0100 (CET) In-Reply-To: <83375lp2ti.fsf@gnu.org> Importance: normal X-MSMail-Priority: normal X-Priority: 3 X-UMS: email X-ID: Zwe5AyZ6YhNu0py5jvVjLcdh4uAH8ls5dE31dzFb2Yx7QC5UsCACuKJl+Y3Bm0+wR2@t-dialin.net X-TOI-MSGID: 7afdce47-d9f2-4abe-a547-fff0f6f3b0b2 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:139828 Archived-At: In a more radical approach and instead of my original patch, one can get ri= d off with the variable first_event all together, see patch below. It simplifies = the code a little bit, but of course is more risky. Olaf diff --git a/src/keyboard.c b/src/keyboard.c index ee353d2..8df43b8 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -8916,7 +8916,6 @@ static void process_tool_bar_item (Lisp_Object, Lisp_= Object, Lisp_Object, ptrdiff_t keys_start; =20 Lisp_Object current_binding =3D Qnil; - Lisp_Object first_event =3D Qnil; =20 /* Index of the first key that has no binding. It is useless to try fkey.start larger than that. */ @@ -9032,7 +9031,7 @@ static void process_tool_bar_item (Lisp_Object, Lisp_= Object, Lisp_Object, 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 =3D active_maps (first_event); + current_binding =3D active_maps (mock_input > 0 ? keybuf[0] : Qnil); =20 /* Start from the beginning in keybuf. */ t =3D 0; @@ -9279,10 +9278,9 @@ static void process_tool_bar_item (Lisp_Object, Lisp= _Object, Lisp_Object, } } =20 - if (NILP (first_event)) + if (t =3D=3D 0) { - first_event =3D key; - /* Even if first_event does not specify a particular + /* Even if key does not specify a particular window/position, it's important to recompute the maps here since a long time might have passed since we entered read_key_sequence, and a timer (or process-filter or @@ -9292,7 +9290,7 @@ static void process_tool_bar_item (Lisp_Object, Lisp_= Object, Lisp_Object, && (XBUFFER (XWINDOW (selected_window)->contents) !=3D current_buffer)) Fset_buffer (XWINDOW (selected_window)->contents); - current_binding =3D active_maps (first_event); + current_binding =3D active_maps (key); } =20 GROW_RAW_KEYBUF; =EF=BB=BF ---------------------------------------------------------------- Gesendet mit Telekom Mail - kostenlos= und sicher f=C3=BCr alle!