(tool-bar-setup): Variable deleted.
(tool-bar-setup): Set it up unconditionally.
This commit is contained in:
parent
3240257259
commit
e4779829b0
1 changed files with 50 additions and 56 deletions
|
@ -57,7 +57,8 @@ conveniently adding tool bar items."
|
||||||
(dolist (frame (frame-list))
|
(dolist (frame (frame-list))
|
||||||
(if (display-graphic-p frame)
|
(if (display-graphic-p frame)
|
||||||
(set-frame-parameter frame 'tool-bar-lines 1)))
|
(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)))))
|
(modify-all-frames-parameters (list (cons 'tool-bar-lines 0)))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
|
@ -258,13 +259,7 @@ holds a keymap."
|
||||||
|
|
||||||
;;; Set up some global items. Additions/deletions up for grabs.
|
;;; Set up some global items. Additions/deletions up for grabs.
|
||||||
|
|
||||||
(defvar tool-bar-setup nil
|
(defun tool-bar-setup ()
|
||||||
"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))
|
|
||||||
;; People say it's bad to have EXIT on the tool bar, since users
|
;; People say it's bad to have EXIT on the tool bar, since users
|
||||||
;; might inadvertently click that button.
|
;; might inadvertently click that button.
|
||||||
;;(tool-bar-add-item-from-menu 'save-buffers-kill-emacs "exit")
|
;;(tool-bar-add-item-from-menu 'save-buffers-kill-emacs "exit")
|
||||||
|
@ -316,8 +311,7 @@ holds a keymap."
|
||||||
(interactive)
|
(interactive)
|
||||||
(popup-menu menu-bar-help-menu))
|
(popup-menu menu-bar-help-menu))
|
||||||
'help
|
'help
|
||||||
:help "Pop up the Help menu"))
|
:help "Pop up the Help menu")))
|
||||||
(setq tool-bar-setup t))))
|
|
||||||
|
|
||||||
|
|
||||||
(provide 'tool-bar)
|
(provide 'tool-bar)
|
||||||
|
|
Loading…
Add table
Reference in a new issue