changeset 12788:eceb3f25e115

(run_hook_with_args): Move the GCPRO2; add UNGCPRO.
author Richard M. Stallman <rms@gnu.org>
date Sun, 06 Aug 1995 06:09:59 +0000
parents 5569b3a43323
children 6ee52fbbee75
files src/eval.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/eval.c	Sat Aug 05 23:01:11 1995 +0000
+++ b/src/eval.c	Sun Aug 06 06:09:59 1995 +0000
@@ -1927,8 +1927,6 @@
   val = find_symbol_value (sym);
   ret = (cond == until_failure ? Qt : Qnil);
 
-  GCPRO2 (sym, val);
-
   if (EQ (val, Qunbound) || NILP (val))
     return ret;
   else if (!CONSP (val) || EQ (XCONS (val)->car, Qlambda))
@@ -1938,6 +1936,8 @@
     }
   else
     {
+      GCPRO2 (sym, val);
+
       for (;
 	   CONSP (val) && ((cond == to_completion)
 			   || (cond == until_success ? NILP (ret)
@@ -1966,6 +1966,8 @@
 	      ret = Ffuncall (nargs, args);
 	    }
 	}
+
+      UNGCPRO;
       return ret;
     }
 }