diff options
| author | Eli Zaretskii | 2018-06-23 10:50:58 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2018-06-23 10:50:58 +0300 |
| commit | 8182d648cb18fb048495c761db7c21fbf3c2a624 (patch) | |
| tree | 92b76aa2b7f60c9f98c7bcd7801b5559e45ffe92 | |
| parent | decdfedf029904c3ecaa082e59e2501572ec77c9 (diff) | |
| download | emacs-8182d648cb18fb048495c761db7c21fbf3c2a624.tar.gz emacs-8182d648cb18fb048495c761db7c21fbf3c2a624.zip | |
Improve documentation of 'server-start' and friends
* lisp/server.el (server-start, server-running-p): Document how to
reliably check that the current Emacs process started the server.
(Bug#31859)
| -rw-r--r-- | lisp/server.el | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/server.el b/lisp/server.el index ac0d7018513..270eff55dcd 100644 --- a/lisp/server.el +++ b/lisp/server.el | |||
| @@ -599,7 +599,10 @@ running, ask the user for confirmation first, unless optional | |||
| 599 | argument INHIBIT-PROMPT is non-nil. | 599 | argument INHIBIT-PROMPT is non-nil. |
| 600 | 600 | ||
| 601 | To force-start a server, do \\[server-force-delete] and then | 601 | To force-start a server, do \\[server-force-delete] and then |
| 602 | \\[server-start]." | 602 | \\[server-start]. |
| 603 | |||
| 604 | To check from a Lisp program whether a server is running, use | ||
| 605 | the `server-process' variable." | ||
| 603 | (interactive "P") | 606 | (interactive "P") |
| 604 | (when (or (not server-clients) | 607 | (when (or (not server-clients) |
| 605 | ;; Ask the user before deleting existing clients---except | 608 | ;; Ask the user before deleting existing clients---except |
| @@ -725,7 +728,11 @@ Return values: | |||
| 725 | nil the server is definitely not running. | 728 | nil the server is definitely not running. |
| 726 | t the server seems to be running. | 729 | t the server seems to be running. |
| 727 | something else we cannot determine whether it's running without using | 730 | something else we cannot determine whether it's running without using |
| 728 | commands which may have to wait for a long time." | 731 | commands which may have to wait for a long time. |
| 732 | |||
| 733 | This function can return non-nil if the server was started by some other | ||
| 734 | Emacs process. To check from a Lisp program whether a server was started | ||
| 735 | by the current Emacs process, use the `server-process' variable." | ||
| 729 | (unless name (setq name server-name)) | 736 | (unless name (setq name server-name)) |
| 730 | (condition-case nil | 737 | (condition-case nil |
| 731 | (if server-use-tcp | 738 | (if server-use-tcp |