From: John Paul Wallington Date: Fri, 25 Jul 2003 12:16:18 +0000 (+0000) Subject: (server-start): Check `server-process' is non-nil X-Git-Tag: ttn-vms-21-2-B4~9234 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=60f8ea53494c5202476162acb984d968041ad1d5;p=emacs.git (server-start): Check `server-process' is non-nil before killing it to avoid killing current buffer's process. --- diff --git a/lisp/server.el b/lisp/server.el index 71e2463c595..36cad64dde5 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -249,7 +249,8 @@ Prefix arg means just kill any existing server communications subprocess." ;; Make sure there is a safe directory in which to place the socket. (server-ensure-safe-dir (file-name-directory server-socket-name)) ;; kill it dead! - (condition-case () (delete-process server-process) (error nil)) + (if server-process + (condition-case () (delete-process server-process) (error nil))) ;; Delete the socket files made by previous server invocations. (condition-case () (delete-file server-socket-name) (error nil)) ;; If this Emacs already had a server, clear out associated status.