From d8cf5c75653d94269ed6815b8a41ab55b85fc0de Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 31 Jul 2017 05:33:48 -0700 Subject: Small code cleanup in tagbody. * share/txr/stdlib/tagbody.tl (tagbody): Reduce unnecessary use of DWIM brackets to parentheses in calculation of bblocks. Remove entry-lbl local variable, propagating its initform to its one and only use site. --- share/txr/stdlib/tagbody.tl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'share') diff --git a/share/txr/stdlib/tagbody.tl b/share/txr/stdlib/tagbody.tl index 7d9057e6..1756fd1b 100644 --- a/share/txr/stdlib/tagbody.tl +++ b/share/txr/stdlib/tagbody.tl @@ -28,11 +28,10 @@ (when forms (let* ((tb-id (gensym "tb-id-")) (next-var (gensym "next-")) - (bblocks [partition forms (op where [orf symbolp integerp chrp])]) - (start-lbl (and (car bblocks) [[orf symbolp integerp chrp] (caar bblocks)])) - (entry-lbl (if start-lbl (caar bblocks) (gensym "entry-")))) + (bblocks (partition forms (op where [orf symbolp integerp chrp]))) + (start-lbl (if bblocks [[orf symbolp integerp chrp] (caar bblocks)]))) (unless start-lbl - (push entry-lbl (car bblocks))) + (push (gensym "entry-") (car bblocks))) (if (and (not start-lbl) (not (cdr bblocks))) ^(progn nil ,*forms nil) (let* ((lbls [mapcar car bblocks]) -- cgit v1.2.3