[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] tool-bar.el
From: |
Nick Roberts |
Subject: |
[PATCH] tool-bar.el |
Date: |
Fri, 28 Oct 2005 15:40:27 +1300 |
The doc strings for tool-bar-add-item-from-menu and
tool-bar-local-item-from-menu appear to have been hacked from earlier commands.
Nick
*** tool-bar.el 18 Oct 2005 11:02:46 +1300 1.1
--- tool-bar.el 28 Oct 2005 15:27:27 +1300
***************
*** 143,149 ****
;;;###autoload
(defun tool-bar-add-item-from-menu (command icon &optional map &rest props)
! "Define tool bar binding for COMMAND using the given ICON in keymap MAP.
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
--- 143,149 ----
;;;###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
***************
*** 153,172 ****
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'."
(apply 'tool-bar-local-item-from-menu command icon
(default-value 'tool-bar-map) map props))
;;;###autoload
(defun tool-bar-local-item-from-menu (command icon in-map &optional from-map
&rest props)
! "Define tool bar binding for COMMAND using the given ICON in keymap MAP.
This makes a binding for COMMAND in IN-MAP, copying its binding from
the menu bar in FROM-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."
(unless from-map
(setq from-map global-map))
(let* ((menu-bar-map (lookup-key from-map [menu-bar]))
--- 153,173 ----
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))
;;;###autoload
(defun tool-bar-local-item-from-menu (command icon in-map &optional from-map
&rest props)
! "Define local tool bar binding for COMMAND using the given ICON.
This makes a binding for COMMAND in IN-MAP, copying its binding from
the menu bar in FROM-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.
! FROM-MAP must contain appropriate binding for `[menu-bar]' which
! holds a keymap."
(unless from-map
(setq from-map global-map))
(let* ((menu-bar-map (lookup-key from-map [menu-bar]))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] tool-bar.el,
Nick Roberts <=