From: Romain Francoise Date: Sun, 28 Sep 2008 09:37:09 +0000 (+0000) Subject: (command-line): Start the daemon server later. X-Git-Tag: emacs-pretest-23.0.90~2735 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7581ba4099a4784e46d62de7df844751d341d984;p=emacs.git (command-line): Start the daemon server later. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 034569fc30e..f1ed3e07e35 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2008-09-28 Romain Francoise + + * startup.el (command-line): Start the daemon server later. + 2008-09-28 Martin Rudalics * subr.el (read-quoted-char): Call char-resolve-modifiers diff --git a/lisp/startup.el b/lisp/startup.el index 0833f98d4dd..5bd73f9e889 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -881,13 +881,8 @@ opening the first frame (e.g. open a connection to an X server).") (run-hooks 'before-init-hook) - (if (daemonp) - ;; Just start the server here, no need to run - ;; `frame-initialize', it deals with creating a frame and - ;; setting the parameters for the initial frame, we don't need - ;; any oxof those. - (server-start) - ;; Under X Window, this creates the X frame and deletes the terminal frame. + ;; Under X Window, this creates the X frame and deletes the terminal frame. + (unless (daemonp) (frame-initialize)) ;; Turn off blinking cursor if so specified in X resources. This is here @@ -1224,6 +1219,13 @@ opening the first frame (e.g. open a connection to an X server).") ;; If -batch, terminate after processing the command options. (if noninteractive (kill-emacs t)) + ;; In daemon mode, start the server to allow clients to connect. + ;; This is done after loading the user's init file and after + ;; processing all command line arguments to allow e.g. `server-name' + ;; to be changed before the server starts. + (when (daemonp) + (server-start)) + ;; Run emacs-session-restore (session management) if started by ;; the session manager and we have a session manager connection. (if (and (boundp 'x-session-previous-id)