4.3BSD-Reno/contrib/lib/emacs/lisp/server.elc
(defvar server-program "server" "\
*The program to use as the edit server")
(defvar server-process nil "\
the current server process")
(defvar server-clients nil "\
List of current server clients.
Each element is (CLIENTID FILES...) where CLIENTID is a string
that can be given to the server process to identify a client.
When a buffer is marked as \"done\", it is removed from this list.")
(defvar server-buffer-clients nil "\
List of clientids for clients requesting editing of current buffer.")
(make-variable-buffer-local (quote server-buffer-clients))
(setq-default server-buffer-clients nil)
(or (assq (quote server-buffer-clients) minor-mode-alist) (setq minor-mode-alist (cons (quote (server-buffer-clients " Server")) minor-mode-alist)))
(defun server-log (string) (byte-code "! qdbco )" [string get-buffer "*server*" newline] 3))
(defun server-sentinel (proc msg) (byte-code "!= !! != !!" [proc process-status exit server-log message "Server subprocess exited" signal "Server subprocess killed"] 7))
(defun server-start (&optional leave-dead) "\
Allow this Emacs process to be a server for client processes.
This starts a server communications subprocess through which
client \"editors\" can send your editing commands to this Emacs job.
To use the server, set up the program `etc/emacsclient' in the
Emacs distribution as your standard \"editor\".
Prefix arg means just kill any existing server communications subprocess." (interactive "P") (byte-code " \"ȏʏ
&