emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/startup.el,v


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/lisp/startup.el,v
Date: Sun, 12 Oct 2008 16:59:01 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      08/10/12 16:59:01

Index: startup.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/startup.el,v
retrieving revision 1.512
retrieving revision 1.513
diff -u -b -r1.512 -r1.513
--- startup.el  11 Oct 2008 12:56:29 -0000      1.512
+++ startup.el  12 Oct 2008 16:59:01 -0000      1.513
@@ -691,6 +691,7 @@
 (declare-function x-get-resource "frame.c"
                  (attribute class &optional component subclass))
 (declare-function tool-bar-mode "tool-bar" (&optional arg))
+(declare-function tool-bar-setup "tool-bar")
 
 (defun command-line ()
   (setq before-init-time (current-time)
@@ -896,17 +897,17 @@
                    (<= (frame-parameter nil 'menu-bar-lines) 0)))
     (menu-bar-mode 1))
 
-  ;; Enable tool-bar-mode if necessary.  Note that we might enable it
-  ;; even in tty frames, which means that there is a tool-bar if Emacs
-  ;; later opens a graphical frame.
-  (unless (or noninteractive emacs-basic-display
-             (not (fboundp 'tool-bar-mode))
-             ;; The tool-bar-lines parameter is nil if starting on a
-             ;; tty; it is 0 if starting on a graphical display with
-             ;; the toolbar disabled via X resources.
+  (unless (or noninteractive (not (fboundp 'tool-bar-mode)))
+    ;; Set up the tool-bar.  Do this even in tty frames, so that there
+    ;; is a tool-bar if Emacs later opens a graphical frame.
+    (if (or emacs-basic-display
              (and (numberp (frame-parameter nil 'tool-bar-lines))
                   (<= (frame-parameter nil 'tool-bar-lines) 0)))
-    (tool-bar-mode 1))
+       ;; On a graphical display with the toolbar disabled via X
+       ;; resources, set up the toolbar without enabling it.
+       (tool-bar-setup)
+      ;; Otherwise, enable tool-bar-mode.
+      (tool-bar-mode 1)))
 
   ;; Can't do this init in defcustom because the relevant variables
   ;; are not set.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]