From xemacs-m  Wed Sep  3 12:38:03 1997
Received: from inf.enst.fr (UEuZR7KAqa08Z3cCa/zmOd7YoBxuXvDK@inf.enst.fr [137.194.2.81])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id MAA10891
	for <xemacs-beta@xemacs.org>; Wed, 3 Sep 1997 12:38:02 -0500 (CDT)
Received: from metheny.enst.fr (metheny.enst.fr [137.194.160.27])
          by inf.enst.fr (8.8.4/8.8.4) with ESMTP
	  id TAA06489 for <xemacs-beta@xemacs.org>; Wed, 3 Sep 1997 19:37:58 +0200 (MET DST)
Received: (from verna@localhost)
          by metheny.enst.fr (8.8.4/8.8.4)
	  id TAA04562; Wed, 3 Sep 1997 19:37:53 +0200 (MET DST)
To: xemacs-beta@xemacs.org
Subject: Re: Important patch for 20.3-beta20, please apply
References: <199709030555.WAA10745@o210.nas.nasa.gov> <m2wwkykjju.fsf@altair.xemacs.org> <87sovm1jl4.fsf@mharnois.workgroup.net>
X-Attribution: dv
X-Url: http://www-inf.enst.fr/~verna/
From: Didier Verna <verna@inf.enst.fr>
In-Reply-To: Michael Harnois's message of "03 Sep 1997 10:51:51 -0500"
X-Face: 6o|eiKqaHN.ANh8HXDzntcWUOCg\]RsOd.ctvm~*y}Y^R&*a+Co,\s#=HWsw3x$b_n2kJ#g
 (7u?J^@^xP)f,jUF|0Z'J:|G/bMA5O12*b,7`-Q`=pKsCRIpso07.Y>YB2H{7`?u&yh;C_ZtLHfj<!
 $J=.i&Al'?,ax]MZd4tcm)_wF3$n*:f/lgS.;?Jr3T;Fl^q<qP**'tw
X-Face: |j}\)O|k##MrRz#VK$Jy=0r=3Qc,,a/Tr6*JQbE73dy17]<u3$*$]4O\1|h\|O\EDT9d$n+
 MTB{U&>2YcmW$9Z&H21e}#~#pgc>dn(is5Bv1l!{1re+Q9suKIOUmOqZs2>QMxHlR;;}kaGYA@HR3D
 C6
Mime-Version: 1.0 (generated by tm-edit 7.108)
Content-Type: text/plain; charset=US-ASCII
Date: 03 Sep 1997 19:37:52 +0200
Message-ID: <qyjbu2a5mdr.fsf@metheny.enst.fr>
Lines: 60
X-Mailer: Gnus v5.4.65/XEmacs 20.3(beta19) - "Kyiv"


	... and since we're in `version' considerations, I think that the
emacs-version function should preserve the previous matching context 
before executing (its string-match notably). This can cause problems
when called in a matching operation.

	Here's a patch:

--- lisp/version.el.orig	Wed Sep  3 19:22:32 1997
+++ lisp/version.el	Wed Sep  3 19:34:43 1997
@@ -86,27 +86,28 @@
 Don't use this function in programs to choose actions according
 to the system configuration; look at `system-configuration' instead."
   (interactive "p")
-  (let ((version-string
-         (format
-	  "XEmacs %s %s(%s%s) of %s %s on %s"
-	  (substring emacs-version 0 (string-match " XEmacs" emacs-version))
-	  (if (not (featurep 'infodock))
-	      "[Lucid] "
-	    "")
-	  system-configuration
-	  (cond ((or (and (fboundp 'featurep)
-			  (featurep 'mule))
-		     (memq 'mule features)) ", Mule")
-		(t ""))
-	  (substring emacs-build-time 0
-		     (string-match " *[0-9]*:" emacs-build-time))
-	  (substring emacs-build-time
-		     (string-match "[0-9]*$" emacs-build-time))
-	  emacs-build-system)))
-    (cond
-     ((null arg) version-string)
-     ((eq arg 1) (message "%s" version-string))
-     (t          (insert version-string)))))
+  (save-match-data
+    (let ((version-string
+	   (format
+	    "XEmacs %s %s(%s%s) of %s %s on %s"
+	    (substring emacs-version 0 (string-match " XEmacs" emacs-version))
+	    (if (not (featurep 'infodock))
+		"[Lucid] "
+	      "")
+	    system-configuration
+	    (cond ((or (and (fboundp 'featurep)
+			    (featurep 'mule))
+		       (memq 'mule features)) ", Mule")
+		  (t ""))
+	    (substring emacs-build-time 0
+		       (string-match " *[0-9]*:" emacs-build-time))
+	    (substring emacs-build-time
+		       (string-match "[0-9]*$" emacs-build-time))
+	    emacs-build-system)))
+      (cond
+       ((null arg) version-string)
+       ((eq arg 1) (message "%s" version-string))
+       (t          (insert version-string))))))
 
 ;; from emacs-vers.el
 (defun emacs-version>= (major &optional minor)

