diff options
| author | Richard M. Stallman | 1995-11-10 04:48:27 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-11-10 04:48:27 +0000 |
| commit | 77d92e058257cd15b34e6917cc8cf5ab7e93c1f1 (patch) | |
| tree | 9d83b125465addf76290bdac0c2372d2e3371689 /src | |
| parent | ebeafce6a57c6356d7732aacf222e157949b9343 (diff) | |
| download | emacs-77d92e058257cd15b34e6917cc8cf5ab7e93c1f1.tar.gz emacs-77d92e058257cd15b34e6917cc8cf5ab7e93c1f1.zip | |
(run-hook-with-args, run-hook-list-with-args): Safeguard
against a t in the global value of hook variables.
Diffstat (limited to 'src')
| -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) | |||
| 1959 | globals = XCONS (globals)->cdr) | 1959 | globals = XCONS (globals)->cdr) |
| 1960 | { | 1960 | { |
| 1961 | args[0] = XCONS (globals)->car; | 1961 | args[0] = XCONS (globals)->car; |
| 1962 | ret = Ffuncall (nargs, args); | 1962 | /* In a global value, t should not occur. If it does, we |
| 1963 | must ignore it to avoid an endless loop. */ | ||
| 1964 | if (!EQ (args[0], Qt)) | ||
| 1965 | ret = Ffuncall (nargs, args); | ||
| 1963 | } | 1966 | } |
| 1964 | } | 1967 | } |
| 1965 | else | 1968 | else |
| @@ -2007,7 +2010,10 @@ run_hook_list_with_args (funlist, nargs, args) | |||
| 2007 | globals = XCONS (globals)->cdr) | 2010 | globals = XCONS (globals)->cdr) |
| 2008 | { | 2011 | { |
| 2009 | args[0] = XCONS (globals)->car; | 2012 | args[0] = XCONS (globals)->car; |
| 2010 | Ffuncall (nargs, args); | 2013 | /* In a global value, t should not occur. If it does, we |
| 2014 | must ignore it to avoid an endless loop. */ | ||
| 2015 | if (!EQ (args[0], Qt)) | ||
| 2016 | Ffuncall (nargs, args); | ||
| 2011 | } | 2017 | } |
| 2012 | } | 2018 | } |
| 2013 | else | 2019 | else |