commit 9a97f6693f40729641b75162008788d02ea5f3f6
parent da393a6b197c35e8759e5834bb1a82bcc719723a
Author: Robby Findler <robby@racket-lang.org>
Date: Sat, 14 Apr 2012 14:54:19 -0500
adjust the way 'new' is laid out in the documentation to be more DrRacket-like
original commit: 0b71ebecafca03470c2e26783e5afbf05df30dce
Diffstat:
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/collects/scribble/private/manual-proc.rkt b/collects/scribble/private/manual-proc.rkt
@@ -363,7 +363,7 @@
(list flow-spacer)
(list flow-spacer flow-spacer
flow-spacer flow-spacer))]
- [one-ok? (tagged+arg-width . < . 60)])
+ [one-ok? (and (not (eq? mode 'new)) (tagged+arg-width . < . 60))])
(list
(make-table
"prototype"
@@ -393,7 +393,9 @@
(arg-id (cadr args))))))])
(cons
(list*
- flow-spacer
+ (if (eq? mode 'new)
+ (flow-spacer/n 3)
+ flow-spacer)
(if (arg-starts-optional? (car args))
(to-flow (make-element #f (list spacer "[")))
flow-spacer)
diff --git a/collects/scribble/private/manual-utils.rkt b/collects/scribble/private/manual-utils.rkt
@@ -11,6 +11,7 @@
[spacer element?]
[to-flow (content? . -> . flow?)]
[flow-spacer flow?]
+ [flow-spacer/n (-> exact-nonnegative-integer? flow?)]
[flow-empty-line flow?]
[make-table-if-necessary (content? list? . -> . (list/c (or/c omitable-paragraph? table?)))]
[current-display-width (parameter/c exact-nonnegative-integer?)])
@@ -20,6 +21,7 @@
(define (to-flow e)
(make-flow (list (make-omitable-paragraph (list e)))))
(define flow-spacer (to-flow spacer))
+(define (flow-spacer/n n) (to-flow (hspace n)))
(define flow-empty-line (to-flow (tt 'nbsp)))
(define (make-table-if-necessary style content)