bkyk8rc3zvpnsf5inmcqq4n3k98cv6hj-my-site-hyper-literate-git.test.suzanne.soy-0.0.1

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit d33566e09f9ab3e5706d1f36ec3a27a4de3d2ca3
parent 43168b31dda33b18b7d1ec8fbda93c380a405bc3
Author: Matthew Flatt <mflatt@racket-lang.org>
Date:   Sat, 21 Feb 2009 13:30:22 +0000

chat-noir literate small repairs

svn: r13765

original commit: 24e4fd407ba20d2eb14cbf1a0ce996e484d4d1d8

Diffstat:
Mcollects/scribble/lp-include.ss | 12+++++++++---
Mcollects/scribble/lp/lang/lang.ss | 14++++++++++----
2 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/collects/scribble/lp-include.ss b/collects/scribble/lp-include.ss @@ -32,12 +32,18 @@ (if (n . > . 1) #'(void) (with-syntax ([tag str] - [str str]) + [str str] + [((for-label-mod ...) ...) + (map (lambda (expr) + (syntax-case expr (require) + [(require mod ...) + #'(mod ...)] + [else null])) + (syntax->list #'(expr ...)))]) #`(begin - ;; ---- This is the new part -------- (define-syntax name (make-element-id-transformer (lambda (stx) #'(chunkref name)))) - ;; ---------------------------------- + (require (for-label for-label-mod ... ...)) (make-splice (list (make-toc-element #f diff --git a/collects/scribble/lp/lang/lang.ss b/collects/scribble/lp/lang/lang.ss @@ -68,7 +68,7 @@ chunk-mentions)]) #`(begin body ... (let ([b-id (void)]) b-use) ...))) -(define-syntax (module-begin stx) +(define-syntax (literate-begin stx) (syntax-case stx () [(module-begin expr ...) (with-syntax @@ -98,6 +98,12 @@ #%provide))) (cons expanded (loop (cdr exprs)))] [else (loop (cdr exprs))]))]))]) - #'(#%module-begin - body-code ... - (tangle)))])) + #'(begin + body-code ... + (tangle)))])) + +(define-syntax (module-begin stx) + (syntax-case stx () + [(_ id exprs . body) + #'(#%module-begin + (literate-begin id exprs . body))]))