emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/tool-bar.el


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/tool-bar.el
Date: Mon, 01 May 2006 20:15:56 +0000

Index: emacs/lisp/tool-bar.el
diff -u emacs/lisp/tool-bar.el:1.5 emacs/lisp/tool-bar.el:1.6
--- emacs/lisp/tool-bar.el:1.5  Mon Feb  6 14:33:35 2006
+++ emacs/lisp/tool-bar.el      Mon May  1 20:15:56 2006
@@ -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 "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)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]