comparison lisp/server.el @ 445:2a2230dd1b1c

*** empty log message ***
author Jim Blandy <jimb@redhat.com>
date Thu, 05 Dec 1991 23:21:45 +0000
parents 50ee23d51f15
children 7cbd4fcd8b0f
comparison
equal deleted inserted replaced
444:4cec2e6d4f9e 445:2a2230dd1b1c
22 22
23 ;;; This Lisp code is run in Emacs when it is to operate as 23 ;;; This Lisp code is run in Emacs when it is to operate as
24 ;;; a server for other processes. 24 ;;; a server for other processes.
25 25
26 ;;; Load this library and do M-x server-edit to enable Emacs as a server. 26 ;;; Load this library and do M-x server-edit to enable Emacs as a server.
27 ;;; Emacs runs the program ../etc/emacsserver as a subprocess 27 ;;; Emacs runs the program ../arch-lib/emacsserver as a subprocess
28 ;;; for communication with clients. If there are no client buffers to edit, 28 ;;; for communication with clients. If there are no client buffers to edit,
29 ;;; server-edit acts like (switch-to-buffer (other-buffer)) 29 ;;; server-edit acts like (switch-to-buffer (other-buffer))
30 30
31 ;;; When some other program runs "the editor" to edit a file, 31 ;;; When some other program runs "the editor" to edit a file,
32 ;;; "the editor" can be the Emacs client program ../etc/emacsclient. 32 ;;; "the editor" can be the Emacs client program ../lib-src/emacsclient.
33 ;;; This program transmits the file names to Emacs through 33 ;;; This program transmits the file names to Emacs through
34 ;;; the server subprocess, and Emacs visits them and lets you edit them. 34 ;;; the server subprocess, and Emacs visits them and lets you edit them.
35 35
36 ;;; Note that any number of clients may dispatch files to emacs to be edited. 36 ;;; Note that any number of clients may dispatch files to emacs to be edited.
37 37
128 (if server-process 128 (if server-process
129 (progn 129 (progn
130 (set-process-sentinel server-process nil) 130 (set-process-sentinel server-process nil)
131 (condition-case () (delete-process server-process) (error nil)))) 131 (condition-case () (delete-process server-process) (error nil))))
132 (condition-case () (delete-file "~/.emacs_server") (error nil)) 132 (condition-case () (delete-file "~/.emacs_server") (error nil))
133 (condition-case ()
134 (delete-file (format "/tmp/esrv%d-%s" (user-uid) (system-name)))
135 (error nil))
136 ;; If we already had a server, clear out associated status. 133 ;; If we already had a server, clear out associated status.
137 (while server-clients 134 (while server-clients
138 (let ((buffer (nth 1 (car server-clients)))) 135 (let ((buffer (nth 1 (car server-clients))))
139 (server-buffer-done buffer))) 136 (server-buffer-done buffer)))
140 (if leave-dead 137 (if leave-dead