summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2022-02-02 19:38:56 +0200
committerEli Zaretskii <eliz@gnu.org>2022-02-02 19:38:56 +0200
commitab2f27542210580ed6235fd7a721a5396a416492 (patch)
treee45bfd1261967032bb5ac8132512d354d2cccff6
parent1bb55536194e59b583b8711101f6a69a9442cfea (diff)
downloademacs-ab2f27542210580ed6235fd7a721a5396a416492.tar.gz
Improve documentation of 'emacs-version'
* doc/emacs/trouble.texi (Checklist): Mention the possibility of invoking 'emacs-version' with a prefix argument. * lisp/version.el (emacs-version): Improve doc string. (Bug#53720)
-rw-r--r--doc/emacs/trouble.texi10
-rw-r--r--lisp/version.el9
2 files changed, 13 insertions, 6 deletions
diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi
index e966565f000..93f9c779dbf 100644
--- a/doc/emacs/trouble.texi
+++ b/doc/emacs/trouble.texi
@@ -782,10 +782,12 @@ Emacs, so you will have to report the bug somewhere else.
@item
The type of machine you are using, and the operating system name and
-version number (again, automatically included by @kbd{M-x
-report-emacs-bug}). @kbd{M-x emacs-version @key{RET}} provides this
-information too. Copy its output from the @file{*Messages*} buffer,
-so that you get it all and get it accurately.
+version number (again, automatically included by @w{@kbd{M-x
+report-emacs-bug}}). @w{@kbd{M-x emacs-version @key{RET}}} provides
+this information too. Copy its output from the @file{*Messages*}
+buffer, so that you get it all and get it accurately, or use
+@w{@kbd{C-u M-x emacs-version @key{RET}}} to insert the version
+information into the current buffer.
@item
The operands given to the @code{configure} command when Emacs was
diff --git a/lisp/version.el b/lisp/version.el
index e0b74d05cc3..fa755c78676 100644
--- a/lisp/version.el
+++ b/lisp/version.el
@@ -54,8 +54,13 @@ developing Emacs.")
(defvar cairo-version-string)
(defun emacs-version (&optional here)
- "Return string describing the version of Emacs that is running.
-If optional argument HERE is non-nil, insert string at point.
+ "Display the version of Emacs that is running in this session.
+With a prefix argument, insert the Emacs version string at point
+instead of displaying it.
+If called from Lisp, by default return the version string; but
+if the optional argument HERE is non-nil, insert the string at
+point instead.
+
Don't use this function in programs to choose actions according
to the system configuration; look at `system-configuration' instead."
(interactive "P")