commit d1178fe6f4fb0a4b49042ee97661e27fae9d495c
parent e0a750d98b8096eb6c6b67ea2bf2096a67589f92
Author: Jay McCarthy <jay.mccarthy@gmail.com>
Date: Mon, 21 Nov 2016 12:00:40 -0500
Add doc-binding option
Diffstat:
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/scribble-lib/scribble/run.rkt b/scribble-lib/scribble/run.rkt
@@ -40,6 +40,7 @@
(and (eof-object? (read i)) v)))))
(define (run)
+ (define doc-binding 'doc)
(command-line
#:program (short-program+command-name)
#:once-any
@@ -136,15 +137,19 @@
#:once-each
[("--quiet") "suppress output-file and undefined-tag reporting"
(current-quiet #t)]
+ [("--doc-binding") new-doc-binding
+ "look for document in new-doc-binding rather than 'doc"
+ (set! doc-binding (string->symbol new-doc-binding))]
#:args (file . another-file)
(let ([files (cons file another-file)])
(parameterize ([current-command-line-arguments
(list->vector (reverse (doc-command-line-arguments)))])
(build-docs (map (lambda (file)
;; Try `doc' submodule, first:
- (if (module-declared? `(submod (file ,file) doc) #t)
- (dynamic-require `(submod (file ,file) doc) 'doc)
- (dynamic-require `(file ,file) 'doc)))
+ (if (module-declared? `(submod (file ,file) ,doc-binding) #t)
+ (dynamic-require `(submod (file ,file) ,doc-binding)
+ doc-binding)
+ (dynamic-require `(file ,file) doc-binding)))
files)
files)))))