changeset 24605:f378efa4aa8a

(do_autoload): Preserve match data.
author Richard M. Stallman <rms@gnu.org>
date Fri, 09 Apr 1999 19:21:52 +0000
parents a9eb0deae6c0
children 6f29d3fe8aa5
files src/eval.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/eval.c	Fri Apr 09 19:20:26 1999 +0000
+++ b/src/eval.c	Fri Apr 09 19:21:52 1999 +0000
@@ -1649,12 +1649,15 @@
   CHECK_SYMBOL (funname, 0);
   GCPRO3 (fun, funname, fundef);
 
-  /* Value saved here is to be restored into Vautoload_queue */
+  /* Preserve the match data.  */
+  record_unwind_protect (Fset_match_data, Fmatch_data (Qnil, Qnil));
+  
+  /* Value saved here is to be restored into Vautoload_queue.  */
   record_unwind_protect (un_autoload, Vautoload_queue);
   Vautoload_queue = Qt;
   Fload (Fcar (Fcdr (fundef)), Qnil, noninteractive ? Qt : Qnil, Qnil, Qt);
 
-  /* Save the old autoloads, in case we ever do an unload. */
+  /* Save the old autoloads, in case we ever do an unload.  */
   queue = Vautoload_queue;
   while (CONSP (queue))
     {
@@ -1664,7 +1667,7 @@
 
       /* Note: This test is subtle.  The cdr of an autoload-queue entry
 	 may be an atom if the autoload entry was generated by a defalias
-	 or fset. */
+	 or fset.  */
       if (CONSP (second))
 	Fput (first, Qautoload, (Fcdr (second)));