changeset 16789:85b1a10101ff

(server-start): Don't delete ~/.emacs-server. Instead, delete the names emacsserver really uses if compiled with SERVER_HOME_DIR.
author Richard M. Stallman <rms@gnu.org>
date Mon, 30 Dec 1996 20:40:27 +0000
parents ffb387a3d054
children 3663fc0c2036
files lisp/server.el
diffstat 1 files changed, 12 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/server.el	Mon Dec 30 18:52:14 1996 +0000
+++ b/lisp/server.el	Mon Dec 30 20:40:27 1996 +0000
@@ -147,20 +147,26 @@
       (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)))