comparison lisp/startup.el @ 98364:229b95df8c83

(command-line): Turn on menu-bar-mode and tool-bar-mode when running as a daemon.
author Dan Nicolaescu <dann@ics.uci.edu>
date Fri, 26 Sep 2008 17:42:20 +0000
parents bea14960a539
children 2fee4892d51a
comparison
equal deleted inserted replaced
98363:eabe88300df7 98364:229b95df8c83
897 (and (memq window-system '(x w32 ns)) 897 (and (memq window-system '(x w32 ns))
898 (not (member (x-get-resource "cursorBlink" "CursorBlink") 898 (not (member (x-get-resource "cursorBlink" "CursorBlink")
899 '("off" "false"))))) 899 '("off" "false")))))
900 (setq no-blinking-cursor t)) 900 (setq no-blinking-cursor t))
901 901
902 ;; If frame was created with a menu bar, set menu-bar-mode on. 902 ;; If we run as a daemon, or frame was created with a menu bar, set
903 (unless (or noninteractive 903 ;; menu-bar-mode on.
904 emacs-basic-display 904 (when (or (daemonp)
905 (and (memq initial-window-system '(x w32)) 905 (not (or noninteractive
906 (<= (frame-parameter nil 'menu-bar-lines) 0))) 906 emacs-basic-display
907 (and (memq initial-window-system '(x w32))
908 (<= (frame-parameter nil 'menu-bar-lines) 0)))))
907 (menu-bar-mode 1)) 909 (menu-bar-mode 1))
908 910
909 ;; If frame was created with a tool bar, switch tool-bar-mode on. 911 ;; If we run as a daemon or frame was created with a tool bar,
910 (unless (or noninteractive 912 ;; switch tool-bar-mode on.
911 emacs-basic-display 913 (when (or (daemonp)
912 (not (display-graphic-p)) 914 (not (or noninteractive
913 (<= (frame-parameter nil 'tool-bar-lines) 0)) 915 emacs-basic-display
914 (tool-bar-mode 1)) 916 (not (display-graphic-p))
917 (<= (frame-parameter nil 'tool-bar-lines) 0))))
918 (tool-bar-mode 1))
915 919
916 ;; Can't do this init in defcustom because the relevant variables 920 ;; Can't do this init in defcustom because the relevant variables
917 ;; are not set. 921 ;; are not set.
918 (custom-reevaluate-setting 'blink-cursor-mode) 922 (custom-reevaluate-setting 'blink-cursor-mode)
919 (custom-reevaluate-setting 'tooltip-mode) 923 (custom-reevaluate-setting 'tooltip-mode)