changeset 16108:2c9c0c867e00

(Fmacroexpand): gcpro form while calling do_autoload. (do_autoload): gcpro fun, funname, fundef.
author Richard M. Stallman <rms@gnu.org>
date Wed, 04 Sep 1996 04:30:26 +0000
parents 6398b414a250
children 198c6c2846ae
files src/eval.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/eval.c	Wed Sep 04 03:58:15 1996 +0000
+++ b/src/eval.c	Wed Sep 04 04:30:26 1996 +0000
@@ -838,7 +838,10 @@
 	      if (EQ (tem, Qt) || EQ (tem, Qmacro))
 		/* Yes, load it and try again.  */
 		{
+		  struct gcpro gcpro1;
+		  GCPRO1 (form);
 		  do_autoload (def, sym);
+		  UNGCPRO;
 		  continue;
 		}
 	      else
@@ -1552,14 +1555,20 @@
   return Qnil;
 }
 
+/* Load an autoloaded function.
+   FUNNAME is the symbol which is the function's name.
+   FUNDEF is the autoload definition (a list).  */
+
 do_autoload (fundef, funname)
      Lisp_Object fundef, funname;
 {
   int count = specpdl_ptr - specpdl;
   Lisp_Object fun, val, queue, first, second;
+  struct gcpro gcpro1, gcpro2, gcpro3;
 
   fun = funname;
   CHECK_SYMBOL (funname, 0);
+  GCPRO3 (fun, funname, fundef);
 
   /* Value saved here is to be restored into Vautoload_queue */
   record_unwind_protect (un_autoload, Vautoload_queue);
@@ -1592,6 +1601,7 @@
   if (!NILP (Fequal (fun, fundef)))
     error ("Autoloading failed to define function %s",
 	   XSYMBOL (funname)->name->data);
+  UNGCPRO;
 }
 
 DEFUN ("eval", Feval, Seval, 1, 1, 0,