Mercurial > emacs
changeset 70323:810cd69c168f
(tool-bar-setup): Put Help and Preferences items in the default tool-bar-map.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 01 May 2006 20:15:56 +0000 |
parents | 020e5fe542a0 |
children | 5a0747ecd057 |
files | lisp/tool-bar.el |
diffstat | 1 files changed, 13 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/tool-bar.el Mon May 01 15:12:44 2006 +0000 +++ b/lisp/tool-bar.el Mon May 01 20:15:56 2006 +0000 @@ -267,14 +267,20 @@ ;;(tool-bar-add-item-from-menu 'compose-mail "mail/compose") (tool-bar-add-item-from-menu 'print-buffer "print") - (tool-bar-add-item "preferences" 'customize 'customize - :help "Edit preferences (customize)") + + ;; tool-bar-add-item-from-menu itself operates on + ;; (default-value 'tool-bar-map), but when we don't use that function, + ;; we must explicitly operate on the default value. - (tool-bar-add-item "help" (lambda () - (interactive) - (popup-menu menu-bar-help-menu)) - 'help - :help "Pop up the Help menu") + (let ((tool-bar-map (default-value 'tool-bar-map))) + (tool-bar-add-item "preferences" 'customize 'customize + :help "Edit preferences (customize)") + + (tool-bar-add-item "help" (lambda () + (interactive) + (popup-menu menu-bar-help-menu)) + 'help + :help "Pop up the Help menu")) ) (provide 'tool-bar)