# HG changeset patch # User Richard M. Stallman # Date 1146514556 0 # Node ID 810cd69c168fcd1727bb60de47ed5bdc0186be3f # Parent 020e5fe542a06c542ed79fbeaeccc5fc2b042fe6 (tool-bar-setup): Put Help and Preferences items in the default tool-bar-map. diff -r 020e5fe542a0 -r 810cd69c168f lisp/tool-bar.el --- 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)