From f3759ab9d25601ac40b3244b61494dcadb7abe5a Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 17 Sep 2007 23:04:32 +0000 Subject: [PATCH] use regexp-split instead of explicit loop svn: r7373 original commit: cf182ae8a9a4a533d8a92f69b1d9f781c0f7b396 --- collects/mred/private/messagebox.ss | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/collects/mred/private/messagebox.ss b/collects/mred/private/messagebox.ss index d7f8ddc1..c3e338d5 100644 --- a/collects/mred/private/messagebox.ss +++ b/collects/mred/private/messagebox.ss @@ -2,6 +2,7 @@ (require (lib "class.ss") (lib "class100.ss") (lib "etc.ss") + (lib "string.ss") (prefix wx: "kernel.ss") "const.ss" "check.ss" @@ -40,11 +41,7 @@ l)) style) - (let* ([strings (let loop ([s message]) - (let ([m (regexp-match #rx"([^\n]*)[\n](.*)" s)]) - (if m - (cons (cadr m) (loop (caddr m))) - (list s))))] + (let* ([strings (regexp-split #rx"\n" message)] [single? (and (< (length strings) 10) (andmap (lambda (s) (< (string-length s) 60)) strings))] [f (make-object (class100 dialog% ()