commit 5b8c9ce05abccc5aec6a0737846948560c117acf parent b4f877bd4544ec1ff1bce0395f4aee9c1cc68d82 Author: Eli Barzilay <eli@racket-lang.org> Date: Mon, 16 Feb 2009 02:59:30 +0000 move the doc wrapper code into literate-doc-wrapper.ss svn: r13650 original commit: 7a0b6c94335f8c10b2fdecbdbbdbf11ed1c321be Diffstat:
| M | collects/games/chat-noir/chat-noir-doc.ss | | | 17 | ++--------------- |
| A | collects/games/chat-noir/literate-doc-wrapper.ss | | | 20 | ++++++++++++++++++++ |
2 files changed, 22 insertions(+), 15 deletions(-)
diff --git a/collects/games/chat-noir/chat-noir-doc.ss b/collects/games/chat-noir/chat-noir-doc.ss @@ -1,16 +1,3 @@ #lang scribble/doc - -@(begin - -(require scribble/manual scribble/decode scheme/include) - -;; define `chunk' as a macro that typesets the code -(define-syntax-rule (chunk name expr ...) - (make-splice (list (emph (scheme name) " ::=") - (schemeblock expr ...)))) - -(define-syntax module - (syntax-rules () [(module name base body ...) (begin body ...)])) -(include "chat-noir-literate.ss") - -) +@(require "literate-doc-wrapper.ss") +@(include "chat-noir-literate.ss") diff --git a/collects/games/chat-noir/literate-doc-wrapper.ss b/collects/games/chat-noir/literate-doc-wrapper.ss @@ -0,0 +1,20 @@ +#lang scheme/base + +;; Use this module to create literate doc wrappers -- files that require the +;; literate code in a way that makes it a scribble file. + +(provide include chunk + (all-from-out scribble/manual)) + +(require scribble/manual scribble/decode scheme/include) + +;; define `chunk' as a macro that typesets the code +(define-syntax-rule (chunk name expr ...) + (make-splice (list (emph (scheme name) " ::=") + (schemeblock expr ...)))) + +;; HACK: provide a fake `module', which makes it possible to include a module +;; and get only its code in. +(provide module) +(define-syntax module + (syntax-rules () [(module name base body ...) (begin body ...)]))