From ca20916b66bdc2bf7605b173029d798e237e96ab Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 4 Sep 1996 04:30:26 +0000 Subject: [PATCH] (Fmacroexpand): gcpro form while calling do_autoload. (do_autoload): gcpro fun, funname, fundef. --- src/eval.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/eval.c b/src/eval.c index 295ddc3852..f41af8c503 100644 --- a/src/eval.c +++ b/src/eval.c @@ -838,7 +838,10 @@ definitions to shadow the loaded ones for use in file byte-compilation.") 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 @@ un_autoload (oldqueue) 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 @@ do_autoload (fundef, funname) if (!NILP (Fequal (fun, fundef))) error ("Autoloading failed to define function %s", XSYMBOL (funname)->name->data); + UNGCPRO; } DEFUN ("eval", Feval, Seval, 1, 1, 0, -- 2.20.1