From d7ba2b97d8c03bf47c25978d96fa055e7d11ba5a Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 16 Feb 2012 06:15:29 -0800 Subject: * eval.c (op_catch): Treat the nil exception object as an empty list, and not the atom nil. * match.c (v_try): Do not transform an atomic exception x into the list ((t . x)). Just to (x). This (t . x) representation is a vestige of from the time when the exception consisted of the old-style return values from txeval. --- ChangeLog | 10 ++++++++++ eval.c | 2 +- match.c | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c8198f43..76bd5ef1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2012-02-16 Kaz Kylheku + + * eval.c (op_catch): Treat the nil exception object as an empty + list, and not the atom nil. + + * match.c (v_try): Do not transform an atomic exception x into + the list ((t . x)). Just to (x). This (t . x) representation is + a vestige of from the time when the exception consisted of the + old-style return values from txeval. + 2012-02-16 Kaz Kylheku TXR Lisp gets exception handling. diff --git a/eval.c b/eval.c index a62353ed..4aa1019b 100644 --- a/eval.c +++ b/eval.c @@ -1094,7 +1094,7 @@ static val op_catch(val form, val env) if (uw_exception_subtype_p(exsym, type)) { val params = second(clause); - val clause_env = bind_args(env, params, if3(consp(exvals), + val clause_env = bind_args(env, params, if3(listp(exvals), exvals, cons(exvals, nil)), clause); result = eval_progn(rest(rest(clause)), clause_env, clause); diff --git a/match.c b/match.c index 66eac4b1..93b55dbf 100644 --- a/match.c +++ b/match.c @@ -3033,7 +3033,7 @@ static val v_try(match_files_ctx *c) val body = third(clause); val vals = if3(listp(exvals), exvals, - cons(cons(t, exvals), nil)); + cons(exvals, nil)); if (first(clause) == catch_s) { if (uw_exception_subtype_p(exsym, type)) { -- cgit v1.2.3