]> git.eshelyaron.com Git - emacs.git/commitdiff
Define libgnutls-version properly
authorNoam Postavsky <npostavs@gmail.com>
Wed, 26 Feb 2020 01:09:00 +0000 (20:09 -0500)
committerNoam Postavsky <npostavs@gmail.com>
Wed, 26 Feb 2020 01:12:57 +0000 (20:12 -0500)
* src/gnutls.c (syms_of_gnutls) <libgnutls-version>: Define with
DEFVAR_LISP and add docstring, so that this variable will accessible by
help facilities.

src/gnutls.c

index 31fcd37c0a65db969990f67efeaaa6c71dfaafcc..70176c41cdde41a468512d915716a82f872ec337 100644 (file)
@@ -2834,16 +2834,21 @@ Any GnuTLS extension with ID up to 100
 void
 syms_of_gnutls (void)
 {
-  DEFSYM (Qlibgnutls_version, "libgnutls-version");
-  Fset (Qlibgnutls_version,
+  DEFVAR_LISP ("libgnutls-version", Vlibgnutls_version,
+               doc: /* The version of libgnutls that Emacs was compiled with.
+The version number is encoded as an integer with the major version in
+the ten thousands place, minor version in the hundreds, and patch
+level in the ones.  For builds without libgnutls, the value is -1.  */);
+  Vlibgnutls_version = make_fixnum
 #ifdef HAVE_GNUTLS
-       make_fixnum (GNUTLS_VERSION_MAJOR * 10000
-                    + GNUTLS_VERSION_MINOR * 100
-                    + GNUTLS_VERSION_PATCH)
+    (GNUTLS_VERSION_MAJOR * 10000
+     + GNUTLS_VERSION_MINOR * 100
+     + GNUTLS_VERSION_PATCH)
 #else
-       make_fixnum (-1)
+    (-1)
 #endif
-        );
+    ;
+
 #ifdef HAVE_GNUTLS
   gnutls_global_initialized = 0;
   PDUMPER_IGNORE (gnutls_global_initialized);