;;; tool-bar.el --- setting up the tool bar
;;
;; Copyright (C) 2000, 2001, 2002, 2003, 2004,
-;; 2005 Free Software Foundation, Inc.
+;; 2005, 2006 Free Software Foundation, Inc.
;;
;; Author: Dave Love <fx@gnu.org>
;; Keywords: mouse frames
;;(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)