From e36ebc9823c14c9e073fb466f5cff38946f8c0c7 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Thu, 27 Dec 2012 11:10:40 -0600 Subject: [PATCH] added make-module-language-tag and use it and make-section-tag in a few places original commit: 353da62843a2b976e300fdd37abdd9b6d6c4894a --- collects/scribble/tag.rkt | 4 ++++ collects/scribblings/scribble/tag.scrbl | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/collects/scribble/tag.rkt b/collects/scribble/tag.rkt index 3525d936..bfddb88f 100644 --- a/collects/scribble/tag.rkt +++ b/collects/scribble/tag.rkt @@ -14,6 +14,7 @@ #:tag-prefixes (or/c #f (listof string?))) . ->* . tag?)] + [make-module-language-tag (-> symbol? tag?)] [taglet? (any/c . -> . boolean?)] [module-path-prefix->string (module-path? . -> . string?)] [module-path-index->taglet (module-path-index? . -> . taglet?)] @@ -25,6 +26,9 @@ (define (make-section-tag s #:doc [doc #f] #:tag-prefixes [prefix #f]) `(part ,(doc-prefix doc prefix s))) +(define (make-module-language-tag langname) + `(mod-path ,(symbol->string langname))) + (define (taglet? v) (and (not (generated-tag? v)) (tag? (list 'something v)))) diff --git a/collects/scribblings/scribble/tag.scrbl b/collects/scribblings/scribble/tag.scrbl index c0d200a1..1153c52f 100644 --- a/collects/scribblings/scribble/tag.scrbl +++ b/collects/scribblings/scribble/tag.scrbl @@ -26,6 +26,11 @@ references a section in the document implemented by prefixes (for intermediate sections, typically) can be provided as @racket[tag-prefixes].} +@defproc[(make-module-language-tag [lang symbol?]) tag?]{ + Forms a @tech{tag} that refers to a section + that contains @racket[defmodulelang] for the language + @racket[lang]. +} @defproc[(taglet? [v any/c]) boolean?]{