summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-10-02 17:17:15 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-10-02 17:17:15 -0700
commit907ff4e00fe3457369afbcb25ef253aaac23a022 (patch)
tree73df7200bd04bdac132d33581b68e87d14b280cb /eval.c
parentb75a472f44d05977c00c7b3be4f3c3d203c38979 (diff)
downloadtxr-907ff4e00fe3457369afbcb25ef253aaac23a022.tar.gz
txr-907ff4e00fe3457369afbcb25ef253aaac23a022.tar.bz2
txr-907ff4e00fe3457369afbcb25ef253aaac23a022.zip
Allow empty loops to be interrupted by signals.
* eval.c (eval_progn): If there are no forms to evaluate, then check for signals.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index f2386bfd..74127bf9 100644
--- a/eval.c
+++ b/eval.c
@@ -1050,6 +1050,11 @@ val eval_progn(val forms, val env, val ctx_form)
{
val retval = nil;
+ if (!forms) {
+ sig_check_fast();
+ return retval;
+ }
+
for (; forms; forms = cdr(forms))
retval = eval(car(forms), env, ctx_form);