From: Richard M. Stallman Date: Sun, 6 Aug 1995 06:09:59 +0000 (+0000) Subject: (run_hook_with_args): Move the GCPRO2; add UNGCPRO. X-Git-Tag: emacs-19.34~3072 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cb9d21f8ac389471c6877ec0e14bc459177b5c35;p=emacs.git (run_hook_with_args): Move the GCPRO2; add UNGCPRO. --- 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; } }