From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#36156: [PATCH] Make toolbar show keyboard equivalents in its tooltips Date: Sun, 25 Aug 2019 23:18:20 +0300 Organization: LINKOV.NET Message-ID: <87v9ulm2dz.fsf@mail.linkov.net> References: <871rxagv91.fsf@linkov.net> <83h865h3ht.fsf@gnu.org> <83ef19gzm1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="93692"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 36156@debbugs.gnu.org, Stefan Kangas To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 25 22:49:22 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i1zRy-000OHb-2E for geb-bug-gnu-emacs@m.gmane.org; Sun, 25 Aug 2019 22:49:22 +0200 Original-Received: from localhost ([::1]:47898 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i1zRw-0004IA-DZ for geb-bug-gnu-emacs@m.gmane.org; Sun, 25 Aug 2019 16:49:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51436) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i1zOu-0001tb-42 for bug-gnu-emacs@gnu.org; Sun, 25 Aug 2019 16:46:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i1zOm-00077T-1A for bug-gnu-emacs@gnu.org; Sun, 25 Aug 2019 16:46:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36334) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i1zOk-00075d-Q4 for bug-gnu-emacs@gnu.org; Sun, 25 Aug 2019 16:46:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i1zOk-0002nR-Mc for bug-gnu-emacs@gnu.org; Sun, 25 Aug 2019 16:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Aug 2019 20:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36156 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 36156-submit@debbugs.gnu.org id=B36156.156676594910719 (code B ref 36156); Sun, 25 Aug 2019 20:46:02 +0000 Original-Received: (at 36156) by debbugs.gnu.org; 25 Aug 2019 20:45:49 +0000 Original-Received: from localhost ([127.0.0.1]:45154 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i1zOV-0002mm-Tr for submit@debbugs.gnu.org; Sun, 25 Aug 2019 16:45:49 -0400 Original-Received: from brown.birch.relay.mailchannels.net ([23.83.209.23]:62218) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i1zOS-0002md-Ui for 36156@debbugs.gnu.org; Sun, 25 Aug 2019 16:45:45 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id D320D341C47; Sun, 25 Aug 2019 20:45:43 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a15.g.dreamhost.com (100-96-29-227.trex.outbound.svc.cluster.local [100.96.29.227]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 5173F341D0B; Sun, 25 Aug 2019 20:45:43 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a15.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.5); Sun, 25 Aug 2019 20:45:43 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Tank-Exultant: 753e43b1288b469e_1566765943588_3409692043 X-MC-Loop-Signature: 1566765943587:775492344 X-MC-Ingress-Time: 1566765943587 Original-Received: from pdx1-sub0-mail-a15.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a15.g.dreamhost.com (Postfix) with ESMTP id 860B2831F9; Sun, 25 Aug 2019 13:45:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=EumWTUYUIkSHtEKy8HjXO1j6SDA=; b= uSbN2QAwRCiM9ZWG2Swn9uUK9Wtuc93O2DR/4VvKE2R8GZTzJpq3vlz1uCMZL/zJ UKDz4etaRwJq63Px7Yh6Ivb/i24QynkdTW2TcjwBdeHFSfI5F1pwv/rxNQOfBA7l XYrM4MVKpJYkELHhw2HmYX3tLaFOwSibeQFTtKSfdRw= Original-Received: from mail.jurta.org (m91-129-109-163.cust.tele2.ee [91.129.109.163]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a15.g.dreamhost.com (Postfix) with ESMTPSA id 6CFA8831F4; Sun, 25 Aug 2019 13:45:35 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a15 In-Reply-To: <83ef19gzm1.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 25 Aug 2019 16:10:14 +0300") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrudehvddgudehhecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtledrudeifeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdelrdduieefpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepvghlihiisehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgepvd 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: 209.51.188.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:165858 Archived-At: >> > Are we sure TOOL_BAR_ITEM_CAPTION will always produce human-readable >> > text? >> >> I think so, because we do this above (quoted to avoid gmail mangling the code): > > That just makes sure it's a string, but what kind of string is that? > A caption can be something unpalatable, like "OpNuFil". Currently HELP's fallback to CAPTION is a standard way to handle absence of HELP: note_tool_bar_highlight has this code: help_echo_string = AREF (f->tool_bar_items, prop_idx + TOOL_BAR_ITEM_HELP); if (NILP (help_echo_string)) help_echo_string = AREF (f->tool_bar_items, prop_idx + TOOL_BAR_ITEM_CAPTION); xg_tool_bar_help_callback has this code: help = AREF (f->tool_bar_items, idx + TOOL_BAR_ITEM_HELP); if (NILP (help)) help = AREF (f->tool_bar_items, idx + TOOL_BAR_ITEM_CAPTION); The patch added the same handling to parse_tool_bar_item: Lisp_Object orig = PROP (TOOL_BAR_ITEM_HELP); + if (NILP (orig)) + orig = PROP (TOOL_BAR_ITEM_CAPTION);