]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve documentation of 'server-start' and friends
authorEli Zaretskii <eliz@gnu.org>
Sat, 23 Jun 2018 07:50:58 +0000 (10:50 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 23 Jun 2018 07:50:58 +0000 (10:50 +0300)
* lisp/server.el (server-start, server-running-p): Document how to
reliably check that the current Emacs process started the server.
(Bug#31859)

lisp/server.el

index ac0d7018513b46e26c00f3c286c53f095c0ad798..270eff55dcd907d4bc2e02918bf7b6db8ef9f6e8 100644 (file)
@@ -599,7 +599,10 @@ running, ask the user for confirmation first, unless optional
 argument INHIBIT-PROMPT is non-nil.
 
 To force-start a server, do \\[server-force-delete] and then
-\\[server-start]."
+\\[server-start].
+
+To check from a Lisp program whether a server is running, use
+the `server-process' variable."
   (interactive "P")
   (when (or (not server-clients)
            ;; Ask the user before deleting existing clients---except
@@ -725,7 +728,11 @@ Return values:
   nil              the server is definitely not running.
   t                the server seems to be running.
   something else   we cannot determine whether it's running without using
-                   commands which may have to wait for a long time."
+                   commands which may have to wait for a long time.
+
+This function can return non-nil if the server was started by some other
+Emacs process.  To check from a Lisp program whether a server was started
+by the current Emacs process, use the `server-process' variable."
   (unless name (setq name server-name))
   (condition-case nil
       (if server-use-tcp