restore `when/block` behavior

pull/110/head
Matthew Butterick 9 years ago
parent 30823c839a
commit 35568a4ba5

@ -105,6 +105,11 @@
""))])) ""))]))
(provide when/block) ; bw compat (provide when/block) ; bw compat
(define-syntax-rule (when/block ARGS ...) (define-syntax (when/block stx)
(when/splice ARGS ...)) (syntax-case stx ()
[(_ condition body ...)
#'(if condition (string-append*
(with-handlers ([exn:fail? (λ(exn) (error (format "within when/block, ~a" (exn-message exn))))])
(map ->string (list body ...))))
"")]))

Loading…
Cancel
Save