From cb9d21f8ac389471c6877ec0e14bc459177b5c35 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 6 Aug 1995 06:09:59 +0000 Subject: [PATCH] (run_hook_with_args): Move the GCPRO2; add UNGCPRO. --- src/eval.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/eval.c b/src/eval.c index 07fbf871b68..938b20cd824 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1927,8 +1927,6 @@ run_hook_with_args (nargs, args, cond) 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 @@ run_hook_with_args (nargs, args, cond) } else { + GCPRO2 (sym, val); + for (; CONSP (val) && ((cond == to_completion) || (cond == until_success ? NILP (ret) @@ -1966,6 +1966,8 @@ run_hook_with_args (nargs, args, cond) ret = Ffuncall (nargs, args); } } + + UNGCPRO; return ret; } } -- 2.39.2