From bc2fa80de71cca43fb5df49346ca09c2f4e163b7 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 1 May 2006 20:15:56 +0000 Subject: (tool-bar-setup): Put Help and Preferences items in the default tool-bar-map. --- lisp/tool-bar.el | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'lisp/tool-bar.el') diff --git a/lisp/tool-bar.el b/lisp/tool-bar.el index 0a1d706a694..37d60441648 100644 --- a/lisp/tool-bar.el +++ b/lisp/tool-bar.el @@ -267,14 +267,20 @@ holds a keymap." ;;(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 "help" (lambda () - (interactive) - (popup-menu menu-bar-help-menu)) - 'help - :help "Pop up the Help menu") + + ;; 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. + + (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) -- cgit v1.2.1