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: Thu, 09 Oct 2008 19:31:52 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      08/10/09 19:31:51

Index: startup.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/startup.el,v
retrieving revision 1.509
retrieving revision 1.510
diff -u -b -r1.509 -r1.510
--- startup.el  7 Oct 2008 19:47:49 -0000       1.509
+++ startup.el  9 Oct 2008 19:31:51 -0000       1.510
@@ -898,13 +898,15 @@
                          (<= (frame-parameter nil 'menu-bar-lines) 0)))))
     (menu-bar-mode 1))
 
-  ;; If we run as a daemon or frame was created with a tool bar,
-  ;; switch tool-bar-mode on.
-  (when (or (daemonp)
-          (not (or noninteractive
-                   emacs-basic-display
-                   (not (display-graphic-p))
-                   (<= (frame-parameter nil 'tool-bar-lines) 0))))
+  ;; 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
+             ;; 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.
+             (and (numberp (frame-parameter nil 'tool-bar-lines))
+                  (<= (frame-parameter nil 'tool-bar-lines) 0)))
           (tool-bar-mode 1))
 
   ;; Can't do this init in defcustom because the relevant variables




reply via email to

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