From: Richard M. Stallman Date: Fri, 10 Nov 1995 04:48:27 +0000 (+0000) Subject: (run-hook-with-args, run-hook-list-with-args): Safeguard X-Git-Tag: emacs-19.34~2416 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=77d92e058257cd15b34e6917cc8cf5ab7e93c1f1;p=emacs.git (run-hook-with-args, run-hook-list-with-args): Safeguard against a t in the global value of hook variables. --- diff --git a/src/eval.c b/src/eval.c index af3624efd85..91a98d6206d 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1959,7 +1959,10 @@ run_hook_with_args (nargs, args, cond) globals = XCONS (globals)->cdr) { args[0] = XCONS (globals)->car; - ret = Ffuncall (nargs, args); + /* In a global value, t should not occur. If it does, we + must ignore it to avoid an endless loop. */ + if (!EQ (args[0], Qt)) + ret = Ffuncall (nargs, args); } } else @@ -2007,7 +2010,10 @@ run_hook_list_with_args (funlist, nargs, args) globals = XCONS (globals)->cdr) { args[0] = XCONS (globals)->car; - Ffuncall (nargs, args); + /* In a global value, t should not occur. If it does, we + must ignore it to avoid an endless loop. */ + if (!EQ (args[0], Qt)) + Ffuncall (nargs, args); } } else