aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index ab6ca36219d..0d7f124f5f3 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -8297,6 +8297,19 @@ parse_tool_bar_item (Lisp_Object key, Lisp_Object item)
8297 if (CONSP (get_keymap (PROP (TOOL_BAR_ITEM_BINDING), 0, 1))) 8297 if (CONSP (get_keymap (PROP (TOOL_BAR_ITEM_BINDING), 0, 1)))
8298 return 0; 8298 return 0;
8299 8299
8300 /* If there is a key binding, add it to the help, which will be
8301 displayed as a tooltip for this entry. */
8302 Lisp_Object binding = PROP (TOOL_BAR_ITEM_BINDING);
8303 Lisp_Object keys = Fwhere_is_internal (binding, Qnil, Qt, Qnil, Qnil);
8304 if (!NILP (keys))
8305 {
8306 AUTO_STRING (beg, " (");
8307 AUTO_STRING (end, ")");
8308 Lisp_Object orig = PROP (TOOL_BAR_ITEM_HELP);
8309 Lisp_Object desc = Fkey_description (keys, Qnil);
8310 set_prop (TOOL_BAR_ITEM_HELP, CALLN (Fconcat, orig, beg, desc, end));
8311 }
8312
8300 /* Enable or disable selection of item. */ 8313 /* Enable or disable selection of item. */
8301 if (!EQ (PROP (TOOL_BAR_ITEM_ENABLED_P), Qt)) 8314 if (!EQ (PROP (TOOL_BAR_ITEM_ENABLED_P), Qt))
8302 set_prop (TOOL_BAR_ITEM_ENABLED_P, 8315 set_prop (TOOL_BAR_ITEM_ENABLED_P,