Skip to content

Commit b3f7015

Browse files
committed
allow content (not just a string) for #:kind in defthing, etc.
Although commit 5415cca just made run-time checking consistent with the documentation, the implementation turned out to allow content before, and some existing documents relied on that. Changes the documentation and contract to allow content, instead.
1 parent 0c93db9 commit b3f7015

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

scribble-doc/scribblings/scribble/manual.scrbl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ Equivalent to @racket[defmodule] variants @racket[#:no-declare].}
836836
ellipses+]
837837
[options (code:line maybe-kind maybe-link maybe-id)]
838838
[maybe-kind code:blank
839-
(code:line #:kind kind-string-expr)]
839+
(code:line #:kind kind-content-expr)]
840840
[maybe-link code:blank
841841
(code:line #:link-target? link-target?-expr)]
842842
[maybe-id code:blank
@@ -945,8 +945,8 @@ by the @racket[current-display-width] parameter.
945945

946946
An optional @racket[#:kind] specification chooses the decorative
947947
label, which defaults to @racket["procedure"]. A @racket[#f]
948-
result for @racket[kind-string-expr] uses the default, otherwise
949-
@racket[kind-string-expr] should produce a string. An alternate
948+
result for @racket[kind-content-expr] uses the default, otherwise
949+
@racket[kind-content-expr] should produce content in the sense of @racket[content?]. An alternate
950950
label should be all lowercase.
951951

952952
If @racket[#:id [src-id dest-id-expr]] is supplied, then
@@ -1007,7 +1007,7 @@ Examples:
10071007
pre-flow ...)
10081008
([options (code:line maybe-kind maybe-link maybe-id maybe-literals)]
10091009
[maybe-kind code:blank
1010-
(code:line #:kind kind-string-expr)]
1010+
(code:line #:kind kind-content-expr)]
10111011
[maybe-link code:blank
10121012
(code:line #:link-target? link-target?-expr)]
10131013
[maybe-id code:blank
@@ -1028,7 +1028,7 @@ result of @racket[id-expr]) whose syntax is described by
10281028
@racket[id], then @racket[form-datum] must have the form @racket[(id
10291029
. _datum)].
10301030

1031-
If @racket[#:kind kind-string-expr] is supplied, it is used in the
1031+
If @racket[#:kind kind-content-expr] is supplied, it is used in the
10321032
same way as for @racket[defproc], but the default kind is
10331033
@racket["syntax"].
10341034

@@ -1338,7 +1338,7 @@ Like @racket[defparam], but the contract on a parameter argument is
13381338
pre-flow ...)
13391339
([options (code:line maybe-kind maybe-link maybe-id)]
13401340
[maybe-kind code:blank
1341-
(code:line #:kind kind-string-expr)]
1341+
(code:line #:kind kind-content-expr)]
13421342
[maybe-link code:blank
13431343
(code:line #:link-target? link-target?-expr)]
13441344
[maybe-id code:blank
@@ -1348,7 +1348,7 @@ Like @racket[defparam], but the contract on a parameter argument is
13481348

13491349
Like @racket[defproc], but for a non-procedure binding.
13501350

1351-
If @racket[#:kind kind-string-expr] is supplied,
1351+
If @racket[#:kind kind-content-expr] is supplied,
13521352
it is used in the same way as for
13531353
@racket[defproc], but the default kind is @racket["value"].
13541354

scribble-lib/scribble/private/manual-proc.rkt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
"../basic.rkt"
55
"../manual-struct.rkt"
66
(only-in "../core.rkt"
7-
make-style make-table-columns)
7+
make-style
8+
make-table-columns
9+
content?)
810
"../html-properties.rkt"
911
"qsloc.rkt"
1012
"manual-utils.rkt"
@@ -131,7 +133,7 @@
131133
#:attributes (kind) ;; Expr[String/#f]
132134
#:description "#:kind keyword"
133135
(pattern (~optional (~seq #:kind k))
134-
#:declare k (expr/c #'(or/c string? #f) #:name "#:kind argument")
136+
#:declare k (expr/c #'(or/c content? #f) #:name "#:kind argument")
135137
#:with kind #'(~? k.c #f)))
136138

137139
(define-splicing-syntax-class value-kw

0 commit comments

Comments
 (0)