From b082f79218f688fc122c784ec85ec0239fef2723 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Fri, 26 Sep 2008 17:42:20 +0000 Subject: [PATCH] (command-line): Turn on menu-bar-mode and tool-bar-mode when running as a daemon. --- lisp/ChangeLog | 5 +++++ lisp/startup.el | 26 +++++++++++++++----------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0652a238fdd..290b6b227e0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-09-26 Dan Nicolaescu + + * startup.el (command-line): Turn on menu-bar-mode and + tool-bar-mode when running as a daemon. + 2008-09-26 Eli Zaretskii * makefile.w32-in ($(lisp)/progmodes/cc-mode.elc): Remove. diff --git a/lisp/startup.el b/lisp/startup.el index dd8fce06a48..0833f98d4dd 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -899,19 +899,23 @@ opening the first frame (e.g. open a connection to an X server).") '("off" "false"))))) (setq no-blinking-cursor t)) - ;; If frame was created with a menu bar, set menu-bar-mode on. - (unless (or noninteractive - emacs-basic-display - (and (memq initial-window-system '(x w32)) - (<= (frame-parameter nil 'menu-bar-lines) 0))) + ;; If we run as a daemon, or frame was created with a menu bar, set + ;; menu-bar-mode on. + (when (or (daemonp) + (not (or noninteractive + emacs-basic-display + (and (memq initial-window-system '(x w32)) + (<= (frame-parameter nil 'menu-bar-lines) 0))))) (menu-bar-mode 1)) - ;; If frame was created with a tool bar, switch tool-bar-mode on. - (unless (or noninteractive - emacs-basic-display - (not (display-graphic-p)) - (<= (frame-parameter nil 'tool-bar-lines) 0)) - (tool-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)))) + (tool-bar-mode 1)) ;; Can't do this init in defcustom because the relevant variables ;; are not set.