diff options
| author | Jason Rumney | 2001-02-23 10:26:22 +0000 |
|---|---|---|
| committer | Jason Rumney | 2001-02-23 10:26:22 +0000 |
| commit | 3a55d3d0274576548190f3687553e7569b0d0c2c (patch) | |
| tree | cacbe098f7660fd27e729b9a8bb9b5761715b85b | |
| parent | 796ead7ee59bd3208da45c259916e75026f41f20 (diff) | |
| download | emacs-3a55d3d0274576548190f3687553e7569b0d0c2c.tar.gz emacs-3a55d3d0274576548190f3687553e7569b0d0c2c.zip | |
(tool-bar-originally-present): New variable.
(command-line): Set it if the tool-bar is switched on at startup.
| -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'." | |||
| 532 | (defconst tool-bar-images-pixel-height 24 | 532 | (defconst tool-bar-images-pixel-height 24 |
| 533 | "Height in pixels of images in the tool bar.") | 533 | "Height in pixels of images in the tool bar.") |
| 534 | 534 | ||
| 535 | (defvar tool-bar-originally-present nil | ||
| 536 | "Non-nil if tool-bars are present before user and site init files are read.") | ||
| 537 | |||
| 535 | ;; Handle the X-like command line parameters "-fg", "-bg", "-name", etc. | 538 | ;; Handle the X-like command line parameters "-fg", "-bg", "-name", etc. |
| 536 | (defun tty-handle-args (args) | 539 | (defun tty-handle-args (args) |
| 537 | (let ((rest nil)) | 540 | (let ((rest nil)) |
| @@ -804,6 +807,18 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." | |||
| 804 | ;; use the right colors, so clear them. | 807 | ;; use the right colors, so clear them. |
| 805 | (clear-face-cache))) | 808 | (clear-face-cache))) |
| 806 | 809 | ||
| 810 | ;; Record whether the tool-bar is present before the user and site | ||
| 811 | ;; init files are processed. frame-notice-user-settings uses this | ||
| 812 | ;; to determine if the tool-bar has been disabled by the init files, | ||
| 813 | ;; and the frame needs to be resized. | ||
| 814 | (when (fboundp 'frame-notice-user-settings) | ||
| 815 | (let ((tool-bar-lines (or (assq 'tool-bar-lines initial-frame-alist) | ||
| 816 | (assq 'tool-bar-lines default-frame-alist)))) | ||
| 817 | (setq tool-bar-originally-present | ||
| 818 | (not (or (null tool-bar-lines) | ||
| 819 | (null (cdr tool-bar-lines)) | ||
| 820 | ((eq 0 (cdr tool-bar-lines)))))))) | ||
| 821 | |||
| 807 | (run-hooks 'before-init-hook) | 822 | (run-hooks 'before-init-hook) |
| 808 | 823 | ||
| 809 | ;; Run the site-start library if it exists. The point of this file is | 824 | ;; Run the site-start library if it exists. The point of this file is |