diff options
author | Richard M. Stallman <rms@gnu.org> | 1995-11-10 04:48:27 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1995-11-10 04:48:27 +0000 |
commit | 0a86b4900dbdc5cc31149e64e1e4aad6ace739a7 (patch) | |
tree | 6b605cce6c3b65101fd1da7718f08ce2c33283a8 /src/eval.c | |
parent | b1863bfd6bb54c6ac6a9a1bfa989985dd7336a30 (diff) | |
download | emacs-0a86b4900dbdc5cc31149e64e1e4aad6ace739a7.tar.gz |
(run-hook-with-args, run-hook-list-with-args): Safeguard
against a t in the global value of hook variables.
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 10 |
1 files changed, 8 insertions, 2 deletions
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 |