[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/tool-bar.el,v
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/tool-bar.el,v |
Date: |
Sun, 12 Oct 2008 13:45:47 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 08/10/12 13:45:46
Index: tool-bar.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/tool-bar.el,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- tool-bar.el 11 Oct 2008 19:45:51 -0000 1.20
+++ tool-bar.el 12 Oct 2008 13:45:46 -0000 1.21
@@ -57,7 +57,8 @@
(dolist (frame (frame-list))
(if (display-graphic-p frame)
(set-frame-parameter frame 'tool-bar-lines 1)))
- (tool-bar-setup))
+ (if (= 1 (length (default-value 'tool-bar-map))) ; not yet setup
+ (tool-bar-setup)))
(modify-all-frames-parameters (list (cons 'tool-bar-lines 0)))))
;;;###autoload
@@ -258,13 +259,7 @@
;;; Set up some global items. Additions/deletions up for grabs.
-(defvar tool-bar-setup nil
- "Non-nil if the tool-bar has been set up by `tool-bar-setup'.")
-
-(defun tool-bar-setup (&optional frame)
- (unless (or tool-bar-setup
- (null tool-bar-mode))
- (with-selected-frame (or frame (selected-frame))
+(defun tool-bar-setup ()
;; 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")
@@ -316,8 +311,7 @@
(interactive)
(popup-menu menu-bar-help-menu))
'help
- :help "Pop up the Help menu"))
- (setq tool-bar-setup t))))
+ :help "Pop up the Help menu")))
(provide 'tool-bar)