Index: configure.in
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-20/configure.in,v
retrieving revision 1.127
diff -u -u -r1.127 configure.in
--- configure.in	1999/03/03 16:11:03	1.127
+++ configure.in	1999/04/30 19:58:42
@@ -925,14 +925,19 @@
 dnl ----------------------------------------
 . "$srcdir/version.sh" || exit 1;
 dnl Must do the following first to determine verbosity for AC_DEFINE
-if test -n "$emacs_beta_version"; then beta=yes; else beta=no; fi
+if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
 : "${extra_verbose=$beta}"
 version="${emacs_major_version}.${emacs_minor_version}"
 AC_DEFINE_UNQUOTED(EMACS_MAJOR_VERSION, $emacs_major_version)
 AC_DEFINE_UNQUOTED(EMACS_MINOR_VERSION, $emacs_minor_version)
-if test -n "$emacs_beta_version"; then
-  version="${version}-b${emacs_beta_version}"
-  AC_DEFINE_UNQUOTED(EMACS_BETA_VERSION, $emacs_beta_version)
+if test -n "$emacs_beta_version" ; then
+  if test "$beta" = "yes"; then
+  	version="${version}-b${emacs_beta_version}"
+  	AC_DEFINE_UNQUOTED(EMACS_BETA_VERSION, $emacs_beta_version)
+  else
+	version="${version}-p${emacs_beta_version}"
+	AC_DEFINE_UNQUOTED(EMACS_PATCH_LEVEL, $emacs_beta_version)
+  fi
 fi
 AC_DEFINE_UNQUOTED(XEMACS_CODENAME, "$xemacs_codename")
 AC_DEFINE_UNQUOTED(EMACS_VERSION, "$version")
@@ -962,7 +967,7 @@
 dnl ----------------------------------
 dnl Error checking default to "yes" in beta versions, to "no" in releases.
 dnl Same goes for --debug and --extra-verbosity.
-if test -n "$emacs_beta_version"; then beta=yes; else beta=no; fi
+if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
 test "${error_check_extents=$beta}"   = yes && AC_DEFINE(ERROR_CHECK_EXTENTS)
 test "${error_check_typecheck=$beta}" = yes && AC_DEFINE(ERROR_CHECK_TYPECHECK)
 test "${error_check_bufpos=$beta}"    = yes && AC_DEFINE(ERROR_CHECK_BUFPOS)
@@ -3934,8 +3939,15 @@
 echo "$0 $quoted_arguments"
 ) > Installation
 
-xemacs_betaname=""
-test ! -z "${emacs_beta_version}" && xemacs_betaname="-b${emacs_beta_version}"
+if test ! -z ${emacs_beta_version} ; then
+  if test -z "${emacs_is_beta}" ; then
+	xemacs_betaname="-p${emacs_beta_version}"
+  else
+	xemacs_betaname="-b${emacs_beta_version}"
+  fi
+else
+  xemacs_betaname=""	
+fi
 
 dnl Start stdout redirection to '| tee -a Installation'
 (
Index: lisp/version.el
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-20/lisp/version.el,v
retrieving revision 1.45
diff -u -u -r1.45 version.el
--- version.el	1998/05/10 00:25:29	1.45
+++ version.el	1999/04/30 19:58:43
@@ -37,13 +37,16 @@
 
 (defconst emacs-version
   (purecopy
-   (format "%d.%d %s%s%s"
+   (format "%d.%d %s%s%s%s"
 	   emacs-major-version
 	   emacs-minor-version
 	   (if xemacs-codename
 	       (concat "\"" xemacs-codename "\"")
 	     "")
 	   " XEmacs Lucid"
+	   (if emacs-patch-level
+	       (format " (patch %d)" emacs-patch-level)
+	     "")
 	   (if xemacs-betaname
 	       (concat " " xemacs-betaname)
 	     "")))
Index: src/config.h.in
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-20/src/config.h.in,v
retrieving revision 1.51
diff -u -u -r1.51 config.h.in
--- config.h.in	1998/11/26 11:36:42	1.51
+++ config.h.in	1999/04/30 19:58:43
@@ -61,6 +61,7 @@
 /* The version info from version.sh. Used in #pragma ident in emacs.c */
 #undef EMACS_MAJOR_VERSION
 #undef EMACS_MINOR_VERSION
+#undef EMACS_PATCH_LEVEL
 #undef EMACS_BETA_VERSION
 #undef EMACS_VERSION
 #undef XEMACS_CODENAME
Index: src/emacs.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-20/src/emacs.c,v
retrieving revision 1.86
diff -u -u -r1.86 emacs.c
--- emacs.c	1999/03/03 16:37:48	1.86
+++ emacs.c	1999/04/30 19:58:44
@@ -107,6 +107,7 @@
 /* Version numbers and strings */
 Lisp_Object Vemacs_major_version;
 Lisp_Object Vemacs_minor_version;
+Lisp_Object Vemacs_patch_level;
 Lisp_Object Vemacs_beta_version;
 Lisp_Object Vxemacs_codename;
 #ifdef INFODOCK
@@ -2747,7 +2748,20 @@
 */ );
   Vemacs_minor_version = make_int (EMACS_MINOR_VERSION);
 
-  DEFVAR_LISP ("emacs-beta-version", &Vemacs_beta_version /*
+  DEFVAR_LISP ("emacs-patch-level", &Vemacs_patch_level /*
+The patch level of this version of Emacs, as an integer.
+The value is non-nil if this version of XEmacs is part of a series of
+stable XEmacsen, but has bug fixes applied.
+Warning: this variable does not exist in FSF Emacs or in XEmacs versions
+earlier than 21.1.1
+*/ );
+#ifdef EMACS_PATCH_LEVEL
+  Vemacs_patch_level = make_int (EMACS_PATCH_LEVEL);
+#else
+  Vemacs_patch_level = Qnil;
+#endif
+
+    DEFVAR_LISP ("emacs-beta-version", &Vemacs_beta_version /*
 Beta number of this version of Emacs, as an integer.
 The value is nil if this is an officially released version of XEmacs.
 Warning: this variable does not exist in FSF Emacs or in XEmacs versions
