aboutsummaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorRichard M. Stallman1996-09-04 04:30:26 +0000
committerRichard M. Stallman1996-09-04 04:30:26 +0000
commitca20916b66bdc2bf7605b173029d798e237e96ab (patch)
tree194856e845a02c1c2a178645fe0467e025e4427c /src/eval.c
parent214360e91f995b4e156db7b06e25b05214d0ba01 (diff)
downloademacs-ca20916b66bdc2bf7605b173029d798e237e96ab.tar.gz
emacs-ca20916b66bdc2bf7605b173029d798e237e96ab.zip
(Fmacroexpand): gcpro form while calling do_autoload.
(do_autoload): gcpro fun, funname, fundef.
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c
index 295ddc3852c..f41af8c503d 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.")
838 if (EQ (tem, Qt) || EQ (tem, Qmacro)) 838 if (EQ (tem, Qt) || EQ (tem, Qmacro))
839 /* Yes, load it and try again. */ 839 /* Yes, load it and try again. */
840 { 840 {
841 struct gcpro gcpro1;
842 GCPRO1 (form);
841 do_autoload (def, sym); 843 do_autoload (def, sym);
844 UNGCPRO;
842 continue; 845 continue;
843 } 846 }
844 else 847 else
@@ -1552,14 +1555,20 @@ un_autoload (oldqueue)
1552 return Qnil; 1555 return Qnil;
1553} 1556}
1554 1557
1558/* Load an autoloaded function.
1559 FUNNAME is the symbol which is the function's name.
1560 FUNDEF is the autoload definition (a list). */
1561
1555do_autoload (fundef, funname) 1562do_autoload (fundef, funname)
1556 Lisp_Object fundef, funname; 1563 Lisp_Object fundef, funname;
1557{ 1564{
1558 int count = specpdl_ptr - specpdl; 1565 int count = specpdl_ptr - specpdl;
1559 Lisp_Object fun, val, queue, first, second; 1566 Lisp_Object fun, val, queue, first, second;
1567 struct gcpro gcpro1, gcpro2, gcpro3;
1560 1568
1561 fun = funname; 1569 fun = funname;
1562 CHECK_SYMBOL (funname, 0); 1570 CHECK_SYMBOL (funname, 0);
1571 GCPRO3 (fun, funname, fundef);
1563 1572
1564 /* Value saved here is to be restored into Vautoload_queue */ 1573 /* Value saved here is to be restored into Vautoload_queue */
1565 record_unwind_protect (un_autoload, Vautoload_queue); 1574 record_unwind_protect (un_autoload, Vautoload_queue);
@@ -1592,6 +1601,7 @@ do_autoload (fundef, funname)
1592 if (!NILP (Fequal (fun, fundef))) 1601 if (!NILP (Fequal (fun, fundef)))
1593 error ("Autoloading failed to define function %s", 1602 error ("Autoloading failed to define function %s",
1594 XSYMBOL (funname)->name->data); 1603 XSYMBOL (funname)->name->data);
1604 UNGCPRO;
1595} 1605}
1596 1606
1597DEFUN ("eval", Feval, Seval, 1, 1, 0, 1607DEFUN ("eval", Feval, Seval, 1, 1, 0,