]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/keyboard.c (parse_tool_bar_item): Use CAPTION when HELP is unavailable
authorJuri Linkov <juri@linkov.net>
Mon, 26 Aug 2019 22:38:19 +0000 (01:38 +0300)
committerJuri Linkov <juri@linkov.net>
Mon, 26 Aug 2019 22:38:19 +0000 (01:38 +0300)
while adding equivalent key binding to the tooltip. (Bug#36156)

src/keyboard.c

index 30686a2589834671fc3ab85736d5c4b248f76184..1b9a603ca17a6c6c2ff8f1093eaf12be36c6de3e 100644 (file)
@@ -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));
     }