[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master a9b393c773 1/2: Include development data in --version output
From: |
Lars Ingebrigtsen |
Subject: |
master a9b393c773 1/2: Include development data in --version output |
Date: |
Mon, 23 May 2022 06:19:18 -0400 (EDT) |
branch: master
commit a9b393c77350cc177952008707781dd97341a83a
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Include development data in --version output
* src/emacs.c (main): Include development into in --version output
(bug#38657).
---
src/emacs.c | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
diff --git a/src/emacs.c b/src/emacs.c
index 056cebb04d..fed525f8bf 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1449,14 +1449,29 @@ main (int argc, char **argv)
version = emacs_version;
copyright = emacs_copyright;
}
- printf (("%s %s\n"
- "%s\n"
+ printf ("%s %s\n", PACKAGE_NAME, version);
+ {
+ Lisp_Object rversion =
+ Fsymbol_value (intern_c_string ("emacs-repository-version"));
+ Lisp_Object rbranch =
+ Fsymbol_value (intern_c_string ("emacs-repository-branch"));
+ Lisp_Object rtime =
+ Fsymbol_value (intern_c_string ("emacs-build-time"));
+ if (!NILP (rversion) && !NILP (rbranch) && !NILP (rtime))
+ printf ("Development version %s on %s branch; build date %s.\n",
+ SSDATA (Fsubstring (rversion, make_fixnum (0),
+ make_fixnum (12))),
+ SSDATA (rbranch),
+ SSDATA (Fformat_time_string (build_string ("%Y-%m-%d"),
+ rtime, Qnil)));
+ }
+ printf (("%s\n"
"%s comes with ABSOLUTELY NO WARRANTY.\n"
"You may redistribute copies of %s\n"
"under the terms of the GNU General Public License.\n"
"For more information about these matters, "
"see the file named COPYING.\n"),
- PACKAGE_NAME, version, copyright, PACKAGE_NAME, PACKAGE_NAME);
+ copyright, PACKAGE_NAME, PACKAGE_NAME);
exit (0);
}