** Emacs now requires GTK 2.24 and GTK 3.10 for the GTK 2 and GTK 3
builds respectively.
+---
+** The toolbar now shows the equivalent key binding in its tooltips.
+
\f
* Startup Changes in Emacs 27.1
** In Emacs Info, examples of using Customize should be clickable
and they should create Custom buffers.
-** The toolbar should show keyboard equivalents in its tooltips.
-
** Add function to redraw the tool bar.
** Redesign the load-history data structure so it can cope better
if (CONSP (get_keymap (PROP (TOOL_BAR_ITEM_BINDING), 0, 1)))
return 0;
+ /* If there is a key binding, add it to the help, which will be
+ displayed as a tooltip for this entry. */
+ Lisp_Object binding = PROP (TOOL_BAR_ITEM_BINDING);
+ Lisp_Object keys = Fwhere_is_internal (binding, Qnil, Qt, Qnil, Qnil);
+ if (!NILP (keys))
+ {
+ AUTO_STRING (beg, " (");
+ AUTO_STRING (end, ")");
+ Lisp_Object orig = PROP (TOOL_BAR_ITEM_HELP);
+ Lisp_Object desc = Fkey_description (keys, Qnil);
+ set_prop (TOOL_BAR_ITEM_HELP, CALLN (Fconcat, orig, beg, desc, end));
+ }
+
/* Enable or disable selection of item. */
if (!EQ (PROP (TOOL_BAR_ITEM_ENABLED_P), Qt))
set_prop (TOOL_BAR_ITEM_ENABLED_P,