]> code.delx.au - gnu-emacs/blobdiff - lisp/tool-bar.el
* net/gnutls.el (gnutls-negotiate): Fix setting of default trustfiles.
[gnu-emacs] / lisp / tool-bar.el
index 4dedf3dfca52a7e03cd21a8c02783bb41af6ef22..a3292c42046ba5cbc4e60105e5857d6b01bf7953 100644 (file)
@@ -1,8 +1,8 @@
 ;;; tool-bar.el --- setting up the tool bar
-;;
-;; Copyright (C) 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
-;;
+
+;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+;;   2009, 2010  Free Software Foundation, Inc.
+
 ;; Author: Dave Love <fx@gnu.org>
 ;; Keywords: mouse frames
 ;; Package: emacs
@@ -51,8 +51,8 @@ See `tool-bar-add-item' and `tool-bar-add-item-from-menu' for
 conveniently adding tool bar items."
   :init-value t
   :global t
-  :group 'mouse
-  :group 'frames
+  ;; It's defined in C/cus-start, this stops the d-m-m macro defining it again.
+  :variable tool-bar-mode
   (let ((val (if tool-bar-mode 1 0)))
     (dolist (frame (frame-list))
       (set-frame-parameter frame 'tool-bar-lines val))
@@ -260,31 +260,28 @@ holds a keymap."
   ;; People say it's bad to have EXIT on the tool bar, since users
   ;; might inadvertently click that button.
   ;;(tool-bar-add-item-from-menu 'save-buffers-kill-emacs "exit")
-  (tool-bar-add-item-from-menu 'find-file "new" nil :label "New File")
-  (tool-bar-add-item-from-menu 'menu-find-file-existing "open")
-  (tool-bar-add-item-from-menu 'dired "diropen")
-  (tool-bar-add-item-from-menu 'kill-this-buffer "close")
-  (tool-bar-add-item-from-menu 'save-buffer "save" nil
-                              :visible '(or buffer-file-name
-                                            (not (eq 'special
-                                                     (get major-mode
-                                                          'mode-class)))))
-  (tool-bar-add-item-from-menu 'write-file "saveas" nil
+  (tool-bar-add-item-from-menu 'find-file "new" nil :label "New File"
+                              :vert-only t)
+  (tool-bar-add-item-from-menu 'menu-find-file-existing "open" nil
+                              :vert-only t)
+  (tool-bar-add-item-from-menu 'dired "diropen" nil :vert-only t)
+  (tool-bar-add-item-from-menu 'kill-this-buffer "close" nil :vert-only t)
+  (tool-bar-add-item-from-menu 'save-buffer "save" nil :vert-only t
                               :visible '(or buffer-file-name
                                             (not (eq 'special
                                                      (get major-mode
                                                           'mode-class)))))
-  (tool-bar-add-item-from-menu 'undo "undo" nil
+  (tool-bar-add-item-from-menu 'undo "undo" nil :vert-only t
                               :visible '(not (eq 'special (get major-mode
                                                                'mode-class))))
   (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [cut])
-                              "cut" nil
+                              "cut" nil :vert-only t
                               :visible '(not (eq 'special (get major-mode
                                                                'mode-class))))
   (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [copy])
-                              "copy")
+                              "copy" nil :vert-only t)
   (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [paste])
-                              "paste" nil
+                              "paste" nil :vert-only t
                               :visible '(not (eq 'special (get major-mode
                                                                'mode-class))))
   (tool-bar-add-item-from-menu 'nonincremental-search-forward "search"
@@ -295,16 +292,12 @@ holds a keymap."
   ;; than a lambda for Read Mail.
   ;;(tool-bar-add-item-from-menu 'compose-mail "mail/compose")
 
-  (tool-bar-add-item-from-menu 'print-buffer "print" nil :label "Print")
 
   ;; 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))
@@ -325,10 +318,10 @@ Customize `tool-bar-mode' if you want to show or hide the tool bar."
       :initialize 'custom-initialize-default
       :set (lambda (sym val)
             (set-default sym val)
-            (modify-all-frames-parameters 
+            (modify-all-frames-parameters
              (list (cons 'tool-bar-position val))))))
 
 
 (provide 'tool-bar)
-;; arch-tag: 15f30f0a-d0d7-4d50-bbb7-f48fd0c8582f
+
 ;;; tool-bar.el ends here