# HG changeset patch # User Dan Nicolaescu # Date 1222450940 0 # Node ID 229b95df8c830bdd0342436e8c35f36dd55f36e8 # Parent eabe88300df73bea48ade7595e3c66a6a6b6409c (command-line): Turn on menu-bar-mode and tool-bar-mode when running as a daemon. diff -r eabe88300df7 -r 229b95df8c83 lisp/ChangeLog --- a/lisp/ChangeLog Fri Sep 26 10:28:46 2008 +0000 +++ b/lisp/ChangeLog Fri Sep 26 17:42:20 2008 +0000 @@ -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 -r eabe88300df7 -r 229b95df8c83 lisp/startup.el --- a/lisp/startup.el Fri Sep 26 10:28:46 2008 +0000 +++ b/lisp/startup.el Fri Sep 26 17:42:20 2008 +0000 @@ -899,19 +899,23 @@ '("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.