Fixed bug introduced by last commit.

This commit is contained in:
Georges Dupéron 2016-06-23 21:19:24 +02:00
parent b9037c3c06
commit f907f59b32

View File

@ -183,26 +183,28 @@
;#`(#,(syntax/loc #'lang #%module-begin) …) ;#`(#,(syntax/loc #'lang #%module-begin) …)
#`(#,(namespace-symbol->identifier '#%module-begin) #`(#,(namespace-symbol->identifier '#%module-begin)
tngl tngl
#,@(maybe-insert-doc-submod submod? lang-sym)))])))])) #,@(if submod?
(define-for-syntax (maybe-insert-doc-submod submod? lang-sym) (list
(if submod? (let ([submod
(list (strip-context
(let ([submod #`(module doc scribble/doclang2
(strip-context (define-syntax-rule (if-preexpanding a b)
#`(module doc scribble/doclang2 b)
(define-syntax-rule (if-preexpanding a b) b) (define-syntax-rule (when-preexpanding . b)
(define-syntax-rule (when-preexpanding . b) (begin)) (begin))
(define-syntax-rule (unless-preexpanding . b) (begin . b)) (define-syntax-rule
(require scribble/manual (unless-preexpanding . b)
(only-in hyper-literate/private/lp (begin . b))
chunk (require scribble/manual
CHUNK) (only-in hyper-literate/private/lp
(for-label #,lang-sym)) chunk
(begin body0 . body)))]) CHUNK)
(syntax-case submod () (for-label #,lang-sym))
[(_ . rest) (begin body0 . body)))])
(datum->syntax #'here (cons #'module* #'rest))]))) (syntax-case submod ()
'())) [(_ . rest)
(datum->syntax #'here (cons #'module* #'rest))])))
'())))])))]))
(define-syntax module-begin/plain (make-module-begin #f)) (define-syntax module-begin/plain (make-module-begin #f))
(define-syntax module-begin/doc (make-module-begin #t)) (define-syntax module-begin/doc (make-module-begin #t))