From 6c77acf6f1e114040d68454858f2a998ef83e0cd Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 30 Jan 2009 16:41:42 +0000 Subject: [PATCH] fix Scribble output of multi-line error messages, especially when they contain a blank line; minor doc repairs svn: r13325 --- collects/scribble/eval.ss | 6 +----- collects/scribblings/foreign/types.scrbl | 2 +- collects/scribblings/gui/bitmap-class.scrbl | 2 +- collects/sirmail/readr.ss | 24 ++++++++++++--------- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/collects/scribble/eval.ss b/collects/scribble/eval.ss index bfac65d473..269dc707b0 100644 --- a/collects/scribble/eval.ss +++ b/collects/scribble/eval.ss @@ -93,11 +93,7 @@ ;; Error result case: (map (lambda (s) - (list (make-flow (list (make-paragraph - (list - (hspace 2) - (span-class "schemeerror" - (italic s)))))))) + (car (format-output s "schemeerror"))) (let sloop ([s (caar val-list+outputs)]) (if ((string-length s) . > . maxlen) ;; break the error message into multiple lines: diff --git a/collects/scribblings/foreign/types.scrbl b/collects/scribblings/foreign/types.scrbl index ef209def38..fd903b638f 100644 --- a/collects/scribblings/foreign/types.scrbl +++ b/collects/scribblings/foreign/types.scrbl @@ -607,7 +607,7 @@ on exit.} A @tech{custom function type} that is similar to @scheme[_ptr], except that it is used for converting lists to/from C vectors. The optional -@scheme[len] argument is needed for output values where it is used in +@scheme[maybe-len] argument is needed for output values where it is used in the post code, and in the pre code of an output mode to allocate the block. In either case, it can refer to a previous binding for the length of the list which the C function will most likely require.} diff --git a/collects/scribblings/gui/bitmap-class.scrbl b/collects/scribblings/gui/bitmap-class.scrbl index d9ca931bde..4591422d5f 100644 --- a/collects/scribblings/gui/bitmap-class.scrbl +++ b/collects/scribblings/gui/bitmap-class.scrbl @@ -222,7 +222,7 @@ returns a bitmap of the same size as this one, a grayscale version is included in the PNG file as the alpha channel. A monochrome bitmap saved as @scheme['png] without a mask bitmap - produces a 1-bit grayscale PNG file (which , when read with + produces a 1-bit grayscale PNG file (which, when read with @method[bitmap% load-file], creates a monochrome @scheme[bitmap%] object.) diff --git a/collects/sirmail/readr.ss b/collects/sirmail/readr.ss index 8ede4cd3e5..0621950186 100644 --- a/collects/sirmail/readr.ss +++ b/collects/sirmail/readr.ss @@ -2565,16 +2565,20 @@ (when fn (let ([safer-fn (normalize-path (build-path (find-system-path 'desk-dir) (regexp-replace* #rx"[/\"|:<>\\]" fn "-")))]) - (insert " " set-standard-style) - (insert "[save to ~/Desktop/ & open]" - (lambda (t s e) - (send t set-clickback s e - (lambda (a b c) - (to-file safer-fn) - (parameterize ([current-input-port (open-input-string "")]) - (system* "/usr/bin/open" (path->string safer-fn)))) - #f #f) - (send t change-style url-delta s e))))))) + (let ([and-open + (lambda (dir) + (insert " " set-standard-style) + (insert (format "[~a & open]" dir) + (lambda (t s e) + (send t set-clickback s e + (lambda (a b c) + (to-file safer-fn) + (parameterize ([current-input-port (open-input-string "")]) + (system* "/usr/bin/open" (path->string safer-fn)))) + #f #f) + (send t change-style url-delta s e))))]) + (and-open "~/Desktop") + (and-open "~/Temp")))))) (insert "\n" set-standard-style) (lambda () (unless content