~ chicken-core (chicken-5) 1c5ce50808416ef20039af87e811ad02cdf36836
commit 1c5ce50808416ef20039af87e811ad02cdf36836 Author: felix <felix@call-with-current-continuation.org> AuthorDate: Mon Jul 11 22:54:21 2011 +0200 Commit: felix <felix@call-with-current-continuation.org> CommitDate: Mon Jul 11 22:54:21 2011 +0200 printer-tweak for regex-match diff --git a/irregex-core.scm b/irregex-core.scm index 9078fba7..cfa3a16c 100644 --- a/irregex-core.scm +++ b/irregex-core.scm @@ -156,7 +156,9 @@ (let ((n (irregex-match-num-submatches m))) (display "#<regexp-match (" out) (display n out) - (display " submatches)>" out))) + (display " submatch" out) + (when (or (eq? n 0) (fx> n 1)) (display "es" out)) + (display ")>" out))) (define-inline (irregex-match-valid-numeric-index? m n) (let ((v (internal "##sys#slot" m 1))) (and (>= n 0) (< (* n 4) (- (internal "##sys#size" v) 4)))))Trap