                 (setq *emdocs-server* nil)
                 (setq emdocs-mode nil)
                 (emdocs-disconnect))
-            (make-local-variable 'emdocs-client-list)
             (setq emdocs-client-list nil)
             (unless (or (string-equal ip "localhost")
                         (string-equal ip ""))

    (insert "sentinel:" msg)
    (unless (bolp) (newline)))
  (cond ((string-match "^open from [0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+\n$" msg)
         (process-send-string sock "give me buffer and ip")
         (add-to-list '*emdocs-clients* sock))
        ((string-match "^connection broken by remote peer\n$" msg)
         (setq *emdocs-clients* (delete sock *emdocs-clients*)))))


(defun emdocs-get-client-process-name (buffer ip)
  "docstring"
  (if (bufferp buffer)
      (concat "*emdocs-client:" (buffer-name buffer) ":" ip "*")
    (concat "*emdocs-client:" buffer "*")))

(defun emdocs-server-sentinel (sock msg)
  "docstring"
