Mercurial > emacs
comparison lisp/startup.el @ 99158:d1d986962044
* emacs.c (daemon_name): New variable.
(main): Deal with --daemon=SERVER_NAME.
(Fdaemonp): Return a name if one was passed to --daemon.
* startup.el (server-name): Pacify byte compiler.
(command-line): If --daemon=SERVER_NAME was used, set server-name
before calling server-start.
* cmdargs.texi (Initial Options): Document -daemon=SERVER_NAME.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Mon, 27 Oct 2008 07:02:30 +0000 |
parents | 638063658f67 |
children | 5f8d9a97e74f |
comparison
equal
deleted
inserted
replaced
99157:5421f3e36aca | 99158:d1d986962044 |
---|---|
691 (declare-function x-get-resource "frame.c" | 691 (declare-function x-get-resource "frame.c" |
692 (attribute class &optional component subclass)) | 692 (attribute class &optional component subclass)) |
693 (declare-function tool-bar-mode "tool-bar" (&optional arg)) | 693 (declare-function tool-bar-mode "tool-bar" (&optional arg)) |
694 (declare-function tool-bar-setup "tool-bar") | 694 (declare-function tool-bar-setup "tool-bar") |
695 | 695 |
696 (defvar server-name) | |
697 | |
696 (defun command-line () | 698 (defun command-line () |
697 (setq before-init-time (current-time) | 699 (setq before-init-time (current-time) |
698 after-init-time nil | 700 after-init-time nil |
699 command-line-default-directory default-directory) | 701 command-line-default-directory default-directory) |
700 | 702 |
1210 | 1212 |
1211 ;; In daemon mode, start the server to allow clients to connect. | 1213 ;; In daemon mode, start the server to allow clients to connect. |
1212 ;; This is done after loading the user's init file and after | 1214 ;; This is done after loading the user's init file and after |
1213 ;; processing all command line arguments to allow e.g. `server-name' | 1215 ;; processing all command line arguments to allow e.g. `server-name' |
1214 ;; to be changed before the server starts. | 1216 ;; to be changed before the server starts. |
1215 (when (daemonp) | 1217 (let ((dn (daemonp))) |
1216 (server-start) | 1218 (when dn |
1217 (daemon-initialized)) | 1219 (when (stringp dn) (setq server-name dn)) |
1220 (server-start) | |
1221 (daemon-initialized))) | |
1218 | 1222 |
1219 ;; Run emacs-session-restore (session management) if started by | 1223 ;; Run emacs-session-restore (session management) if started by |
1220 ;; the session manager and we have a session manager connection. | 1224 ;; the session manager and we have a session manager connection. |
1221 (if (and (boundp 'x-session-previous-id) | 1225 (if (and (boundp 'x-session-previous-id) |
1222 (stringp x-session-previous-id)) | 1226 (stringp x-session-previous-id)) |