diff options
author | Jason Rumney <jasonr@gnu.org> | 2001-02-23 10:26:22 +0000 |
---|---|---|
committer | Jason Rumney <jasonr@gnu.org> | 2001-02-23 10:26:22 +0000 |
commit | 2e60d65f70eca7defa6de9bd69f985c5862f0375 (patch) | |
tree | 73260a15f8e0e443d7fbbf459fc5a9be4351cb6d /lisp/startup.el | |
parent | ca8bb5517a9d1c6f02538217afb438c22964dcca (diff) | |
download | emacs-2e60d65f70eca7defa6de9bd69f985c5862f0375.tar.gz |
(tool-bar-originally-present): New variable.
(command-line): Set it if the tool-bar is switched on at startup.
Diffstat (limited to 'lisp/startup.el')
-rw-r--r-- | lisp/startup.el | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lisp/startup.el b/lisp/startup.el index 3f024fc7426..107e35b2532 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -532,6 +532,9 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." (defconst tool-bar-images-pixel-height 24 "Height in pixels of images in the tool bar.") +(defvar tool-bar-originally-present nil + "Non-nil if tool-bars are present before user and site init files are read.") + ;; Handle the X-like command line parameters "-fg", "-bg", "-name", etc. (defun tty-handle-args (args) (let ((rest nil)) @@ -804,6 +807,18 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." ;; use the right colors, so clear them. (clear-face-cache))) + ;; Record whether the tool-bar is present before the user and site + ;; init files are processed. frame-notice-user-settings uses this + ;; to determine if the tool-bar has been disabled by the init files, + ;; and the frame needs to be resized. + (when (fboundp 'frame-notice-user-settings) + (let ((tool-bar-lines (or (assq 'tool-bar-lines initial-frame-alist) + (assq 'tool-bar-lines default-frame-alist)))) + (setq tool-bar-originally-present + (not (or (null tool-bar-lines) + (null (cdr tool-bar-lines)) + ((eq 0 (cdr tool-bar-lines)))))))) + (run-hooks 'before-init-hook) ;; Run the site-start library if it exists. The point of this file is |