diff options
| author | Chong Yidong | 2008-10-12 16:59:01 +0000 |
|---|---|---|
| committer | Chong Yidong | 2008-10-12 16:59:01 +0000 |
| commit | d2b2930a59174f3240b07e843346dc5d8acc2d3a (patch) | |
| tree | e2d9619ada107d7416e9b6fb5f26a7dd44e3e804 | |
| parent | 5e1115e31564c631ad48531ce88c022deb94e35c (diff) | |
| download | emacs-d2b2930a59174f3240b07e843346dc5d8acc2d3a.tar.gz emacs-d2b2930a59174f3240b07e843346dc5d8acc2d3a.zip | |
(command-line): If toolbar is disabled but ought to be initialized,
call tool-bar-setup.
| -rw-r--r-- | lisp/startup.el | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/lisp/startup.el b/lisp/startup.el index 09b21a325a9..6185cd5975a 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -691,6 +691,7 @@ opening the first frame (e.g. open a connection to an X server).") | |||
| 691 | (declare-function x-get-resource "frame.c" | 691 | (declare-function x-get-resource "frame.c" |
| 692 | (attribute class &optional component subclass)) | 692 | (attribute class &optional component subclass)) |
| 693 | (declare-function tool-bar-mode "tool-bar" (&optional arg)) | 693 | (declare-function tool-bar-mode "tool-bar" (&optional arg)) |
| 694 | (declare-function tool-bar-setup "tool-bar") | ||
| 694 | 695 | ||
| 695 | (defun command-line () | 696 | (defun command-line () |
| 696 | (setq before-init-time (current-time) | 697 | (setq before-init-time (current-time) |
| @@ -896,17 +897,17 @@ opening the first frame (e.g. open a connection to an X server).") | |||
| 896 | (<= (frame-parameter nil 'menu-bar-lines) 0))) | 897 | (<= (frame-parameter nil 'menu-bar-lines) 0))) |
| 897 | (menu-bar-mode 1)) | 898 | (menu-bar-mode 1)) |
| 898 | 899 | ||
| 899 | ;; Enable tool-bar-mode if necessary. Note that we might enable it | 900 | (unless (or noninteractive (not (fboundp 'tool-bar-mode))) |
| 900 | ;; even in tty frames, which means that there is a tool-bar if Emacs | 901 | ;; Set up the tool-bar. Do this even in tty frames, so that there |
| 901 | ;; later opens a graphical frame. | 902 | ;; is a tool-bar if Emacs later opens a graphical frame. |
| 902 | (unless (or noninteractive emacs-basic-display | 903 | (if (or emacs-basic-display |
| 903 | (not (fboundp 'tool-bar-mode)) | 904 | (and (numberp (frame-parameter nil 'tool-bar-lines)) |
| 904 | ;; The tool-bar-lines parameter is nil if starting on a | 905 | (<= (frame-parameter nil 'tool-bar-lines) 0))) |
| 905 | ;; tty; it is 0 if starting on a graphical display with | 906 | ;; On a graphical display with the toolbar disabled via X |
| 906 | ;; the toolbar disabled via X resources. | 907 | ;; resources, set up the toolbar without enabling it. |
| 907 | (and (numberp (frame-parameter nil 'tool-bar-lines)) | 908 | (tool-bar-setup) |
| 908 | (<= (frame-parameter nil 'tool-bar-lines) 0))) | 909 | ;; Otherwise, enable tool-bar-mode. |
| 909 | (tool-bar-mode 1)) | 910 | (tool-bar-mode 1))) |
| 910 | 911 | ||
| 911 | ;; Can't do this init in defcustom because the relevant variables | 912 | ;; Can't do this init in defcustom because the relevant variables |
| 912 | ;; are not set. | 913 | ;; are not set. |