bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#36156: [PATCH] Make toolbar show keyboard equivalents in its tooltip


From: Juri Linkov
Subject: bug#36156: [PATCH] Make toolbar show keyboard equivalents in its tooltips
Date: Sat, 24 Aug 2019 23:40:10 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

> Please let me know what you think.

Today I found a regression in this change: when a tool-bar item
doesn't use a :help keyword (like e.g. in gud-menu-map) then
the tooltip displays just keyboard equivalents in its tooltip.
It used to display the caption in previous Emacs versions.
I believe it could be fixed by this patch:

diff --git a/src/keyboard.c b/src/keyboard.c
index 30686a2589..1b9a603ca1 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -8304,6 +8304,10 @@ parse_tool_bar_item (Lisp_Object key, Lisp_Object item)
       AUTO_STRING (end, ")");
       Lisp_Object orig = PROP (TOOL_BAR_ITEM_HELP);
       Lisp_Object desc = Fkey_description (keys, Qnil);
+
+      if (NILP (orig))
+        orig = PROP (TOOL_BAR_ITEM_CAPTION);
+
       set_prop (TOOL_BAR_ITEM_HELP, CALLN (Fconcat, orig, beg, desc, end));
     }
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]