diff options
author | Jim Porter <jporterbugs@gmail.com> | 2022-11-27 22:21:10 -0800 |
---|---|---|
committer | Jim Porter <jporterbugs@gmail.com> | 2022-12-07 21:54:00 -0800 |
commit | 153c67fa92eaad39410b1809ab9b125616bdc5c1 (patch) | |
tree | 60a35c3c8aa66c5d04555c5c66439be62bb64fe8 /doc/emacs/misc.texi | |
parent | 5d68cc99177569a661da0ac75bb7df1ec4098fda (diff) | |
download | emacs-153c67fa92eaad39410b1809ab9b125616bdc5c1.tar.gz |
Make 'server-stop-automatically' into a defcustom
This changes the meaning of the (formerly internal) variable
'server-stop-automatically': it now always holds the requested
configuration, even when Emacs was not started as a daemon
(bug#59668).
* lisp/server.el (server-stop-automatically): Convert the variable to
a defcustom, and make the function simply set the defcustom.
(server-stop-automatically--timer): New variable.
(server-apply-stop-automatically): New function...
(server-stop, server-start): ... call it.
(server-save-buffers-kill-terminal): Adjust the conditions for
stopping automatically to account for the change of meaning for
'server-stop-automatically'.
(server-stop-automatically--handle-delete-frame): Remove unnecessary
test of the 'server-stop-automatically' option; this hook is only set
when it should do its job.
(server-stop-automatically--maybe-kill-emacs): Update docstring.
* doc/emacs/misc.texi (Emacs Server): Update documentation.
Diffstat (limited to 'doc/emacs/misc.texi')
-rw-r--r-- | doc/emacs/misc.texi | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 29c0bed19c0..702c72bac25 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -1808,31 +1808,28 @@ you can give each daemon its own server name like this: emacs --daemon=foo @end example -@findex server-stop-automatically +@vindex server-stop-automatically The Emacs server can optionally be stopped automatically when -certain conditions are met. To do this, call the function -@code{server-stop-automatically} in your init file (@pxref{Init -File}), with one of the following arguments: +certain conditions are met. To do this, set the option +@code{server-stop-automatically} to one of the following values: -@itemize -@item -With the argument @code{empty}, the server is stopped when it has no -clients, no unsaved file-visiting buffers and no running processes -anymore. - -@item -With the argument @code{delete-frame}, when the last client frame is -being closed, you are asked whether each unsaved file-visiting buffer -must be saved and each unfinished process can be stopped, and if so, -the server is stopped. - -@item -With the argument @code{kill-terminal}, when the last client frame is -being closed with @kbd{C-x C-c} (@code{save-buffers-kill-terminal}), -you are asked whether each unsaved file-visiting buffer must be saved -and each unfinished process can be stopped, and if so, the server is +@table @code +@item empty +This value causes the server to be stopped when it has no clients, no +unsaved file-visiting buffers and no running processes anymore. + +@item delete-frame +This value means that when the last client frame is being closed, you +are asked whether each unsaved file-visiting buffer must be saved and +each unfinished process can be stopped, and if so, the server is stopped. -@end itemize + +@item kill-terminal +This value means that when the last client frame is being closed with +@kbd{C-x C-c} (@code{save-buffers-kill-terminal}), you are asked +whether each unsaved file-visiting buffer must be saved and each +unfinished process can be stopped, and if so, the server is stopped. +@end table @findex server-eval-at If you have defined a server by a unique server name, it is possible |