]> code.delx.au - gnu-emacs/blobdiff - lisp/tool-bar.el
Rename `MS-DOG' into `MS-DOS'.
[gnu-emacs] / lisp / tool-bar.el
index 15321a4ffd8bda765ca90c7aa7550c6569f08e30..37d60441648c392ffdf364a43fa178d067aff44b 100644 (file)
@@ -1,7 +1,7 @@
 ;;; 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
@@ -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)