* server.el (server-process-filter): Use expand-file-name rather than
[bpt/emacs.git] / lisp / server.el
index f42be58..10b08ad 100644 (file)
@@ -240,9 +240,9 @@ ENV should be in the same format as `process-environment'."
     `(let ((process-environment process-environment))
        (dolist (,var ,vars)
          (let ((,value (getenv-internal ,var ,env)))
-           (push (if (null ,value)
-                     ,var
-                   (concat ,var "=" ,value))
+           (push (if (stringp ,value)
+                     (concat ,var "=" ,value)
+                   ,var)
                  process-environment)))
        (progn ,@body))))
 
@@ -493,9 +493,14 @@ To force-start a server, do \\[server-force-delete] and then
          ;; Remove any leftover socket or authentication file
          (ignore-errors (delete-file server-file))
        (setq server-mode nil) ;; already set by the minor mode code
-       (display-warning 'server
-                        (format "Emacs server named %S already running" server-name)
-                        :warning)
+       (display-warning
+        'server
+        (concat "Unable to start the Emacs server.\n"
+                (format "There is an existing Emacs server, named %S.\n"
+                        server-name)
+                "To start the server in this Emacs process, stop the existing
+server or call `M-x server-force-delete' to forcibly disconnect it.")
+        :warning)
        (setq leave-dead t))
       ;; If this Emacs already had a server, clear out associated status.
       (while server-clients
@@ -590,7 +595,7 @@ Return values:
            (insert-file-contents-literally (expand-file-name name server-auth-dir))
            (or (and (looking-at "127\\.0\\.0\\.1:[0-9]+ \\([0-9]+\\)")
                     (assq 'comm
-                          (system-process-attributes
+                          (process-attributes
                            (string-to-number (match-string 1))))
                     t)
                :other))
@@ -957,7 +962,7 @@ The following commands are accepted by the client:
                  (let ((file (pop command-line-args-left)))
                    (if coding-system
                        (setq file (decode-coding-string file coding-system)))
-                   (setq file (command-line-normalize-file-name file))
+                    (setq file (expand-file-name file dir))
                    (push (cons file filepos) files)
                    (server-log (format "New file: %s %s"
                                         file (or filepos "")) proc))