Function: tool-bar-add-item-from-menu
tool-bar-add-item-from-menu is an autoloaded and byte-compiled
function defined in tool-bar.el.gz.
Signature
(tool-bar-add-item-from-menu COMMAND ICON &optional MAP &rest PROPS)
Documentation
Define tool bar binding for COMMAND in keymap MAP using the given ICON.
This makes a binding for COMMAND in tool-bar-map, copying its
binding from the menu bar in MAP (which defaults to global-map), but
modifies the binding by adding an image specification for ICON. It
finds ICON just like tool-bar-add-item. PROPS are additional
properties to add to the binding.
MAP must contain appropriate binding for [menu-bar] which holds a keymap.
Use this function only to make bindings in the global value of tool-bar-map.
To define items in any other map, use tool-bar-local-item-from-menu.
Probably introduced at or before Emacs version 21.1.
Source Code
;; Defined in /usr/src/emacs/lisp/tool-bar.el.gz
;;;###autoload
(defun tool-bar-add-item-from-menu (command icon &optional map &rest props)
"Define tool bar binding for COMMAND in keymap MAP using the given ICON.
This makes a binding for COMMAND in `tool-bar-map', copying its
binding from the menu bar in MAP (which defaults to `global-map'), but
modifies the binding by adding an image specification for ICON. It
finds ICON just like `tool-bar-add-item'. PROPS are additional
properties to add to the binding.
MAP must contain appropriate binding for `[menu-bar]' which holds a keymap.
Use this function only to make bindings in the global value of `tool-bar-map'.
To define items in any other map, use `tool-bar-local-item-from-menu'."
(apply #'tool-bar-local-item-from-menu command icon
(default-value 'tool-bar-map) map props))