[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-27 0d4ba1c: Improve documentation of 'kill-emacs'

From: Eli Zaretskii
Subject: emacs-27 0d4ba1c: Improve documentation of 'kill-emacs'
Date: Fri, 17 Jul 2020 10:55:01 -0400 (EDT)

branch: emacs-27
commit 0d4ba1c2b27cb36423400e697a19d7cf80352a54
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Improve documentation of 'kill-emacs'
    * doc/lispref/os.texi (Killing Emacs):
    * src/emacs.c (Fkill_emacs): Document what non-integer, non-string
    argument to 'kill-emacs' means.  (Bug#42400)
 doc/lispref/os.texi | 4 ++++
 src/emacs.c         | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 1c3be1c..b31ab87 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -707,6 +707,10 @@ the Emacs process.  (This is useful primarily in batch 
operation; see
 If @var{exit-data} is a string, its contents are stuffed into the
 terminal input buffer so that the shell (or whatever program next reads
 input) can read them.
+If @var{exit-data} is neither an integer nor a string, or is omitted,
+that means to use the (system-specific) exit status which indicates
+successful program termination.
 @end deffn
 @cindex SIGTERM
diff --git a/src/emacs.c b/src/emacs.c
index 6118ad3..1dcf195 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -2352,6 +2352,8 @@ DEFUN ("kill-emacs", Fkill_emacs, Skill_emacs, 0, 1, "P",
        doc: /* Exit the Emacs job and kill it.
 If ARG is an integer, return ARG as the exit program code.
 If ARG is a string, stuff it as keyboard input.
+Any other value of ARG, or ARG omitted, means return an
+exit code that indicates successful program termination.
 This function is called upon receipt of the signals SIGTERM
 or SIGHUP, and upon SIGINT in batch mode.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]