summaryrefslogtreecommitdiff
path: root/lisp/server.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-12-30 20:40:27 +0000
committerRichard M. Stallman <rms@gnu.org>1996-12-30 20:40:27 +0000
commit69a869f209f35ffab8bccd2d8444fc90b2d485a6 (patch)
tree822c632f239e4eac15a7e61ba2a34d98ce8e38be /lisp/server.el
parent4541102ac0cec8583a72c4f8ad5b0a9d447f81b9 (diff)
downloademacs-69a869f209f35ffab8bccd2d8444fc90b2d485a6.tar.gz
(server-start): Don't delete ~/.emacs-server.
Instead, delete the names emacsserver really uses if compiled with SERVER_HOME_DIR.
Diffstat (limited to 'lisp/server.el')
-rw-r--r--lisp/server.el18
1 files changed, 12 insertions, 6 deletions
diff --git a/lisp/server.el b/lisp/server.el
index f4d3b7cb2de..4348e9a5134 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -147,20 +147,26 @@ Prefix arg means just kill any existing server communications subprocess."
(progn
(set-process-sentinel server-process nil)
(condition-case () (delete-process server-process) (error nil))))
- (condition-case () (delete-file "~/.emacs_server") (error nil))
+ ;; Delete the socket files made by previous server invocations.
(let* ((sysname (system-name))
(dot-index (string-match "\\." sysname)))
(condition-case ()
+ (delete-file (format "~/.emacs-server-%s" sysname))
+ (error nil))
+ (condition-case ()
(delete-file (format "/tmp/esrv%d-%s" (user-uid) sysname))
(error nil))
;; In case the server file name was made with a domainless hostname,
;; try deleting that name too.
(if dot-index
- (condition-case ()
- (delete-file (format "/tmp/esrv%d-%s" (user-uid)
- (substring sysname 0 dot-index)))
- (error nil))))
- ;; If we already had a server, clear out associated status.
+ (let ((shortname (substring sysname 0 dot-index)))
+ (condition-case ()
+ (delete-file (format "~/.emacs-server-%s" shortname))
+ (error nil))
+ (condition-case ()
+ (delete-file (format "/tmp/esrv%d-%s" (user-uid) shortname))
+ (error nil)))))
+ ;; If this Emacs already had a server, clear out associated status.
(while server-clients
(let ((buffer (nth 1 (car server-clients))))
(server-buffer-done buffer)))