use some scheme/list-isms
svn: r9991
This commit is contained in:
parent
ad1838c72b
commit
6ca9703fcc
|
@ -5,6 +5,7 @@
|
||||||
"private/doc-path.ss"
|
"private/doc-path.ss"
|
||||||
"main-collects.ss"
|
"main-collects.ss"
|
||||||
scheme/class
|
scheme/class
|
||||||
|
scheme/list
|
||||||
scheme/file
|
scheme/file
|
||||||
scheme/fasl
|
scheme/fasl
|
||||||
scheme/serialize
|
scheme/serialize
|
||||||
|
@ -31,9 +32,8 @@
|
||||||
(memq 'user-doc (doc-flags doc))))
|
(memq 'user-doc (doc-flags doc))))
|
||||||
|
|
||||||
(define (filter-user-docs docs make-user?)
|
(define (filter-user-docs docs make-user?)
|
||||||
(define (filtered) (filter (lambda (doc) (not (user-doc? doc))) docs))
|
|
||||||
(cond ;; Specifically disabled user stuff, filter
|
(cond ;; Specifically disabled user stuff, filter
|
||||||
[(not make-user?) (filtered)]
|
[(not make-user?) (filter-not user-doc? docs)]
|
||||||
;; If we've built user-specific before, keep building
|
;; If we've built user-specific before, keep building
|
||||||
[(file-exists? (build-path (find-user-doc-dir) "index.html")) docs]
|
[(file-exists? (build-path (find-user-doc-dir) "index.html")) docs]
|
||||||
;; Otherwise, see if we need it:
|
;; Otherwise, see if we need it:
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
(memq 'no-depend-on (doc-flags doc)))))
|
(memq 'no-depend-on (doc-flags doc)))))
|
||||||
docs)
|
docs)
|
||||||
docs]
|
docs]
|
||||||
[else (filtered)])) ; Don't need them, so drop them
|
[else (filter-not user-doc? docs)])) ; Don't need them, so drop them
|
||||||
|
|
||||||
(define (setup-scribblings
|
(define (setup-scribblings
|
||||||
only-dirs ; limits doc builds
|
only-dirs ; limits doc builds
|
||||||
|
@ -95,9 +95,8 @@
|
||||||
(define docs
|
(define docs
|
||||||
(let* ([dirs (find-relevant-directories '(scribblings))]
|
(let* ([dirs (find-relevant-directories '(scribblings))]
|
||||||
[infos (map get-info/full dirs)])
|
[infos (map get-info/full dirs)])
|
||||||
(filter-user-docs (apply append (map get-docs infos dirs)) make-user?)))
|
(filter-user-docs (append-map get-docs infos dirs) make-user?)))
|
||||||
(define main-docs (filter doc-under-main? docs))
|
(define-values (main-docs user-docs) (partition doc-under-main? docs))
|
||||||
(define user-docs (filter (lambda (d) (not (doc-under-main? d))) docs))
|
|
||||||
(define (can-build*? docs) (can-build? only-dirs docs))
|
(define (can-build*? docs) (can-build? only-dirs docs))
|
||||||
(define auto-main? (and auto-start-doc? (ormap can-build*? main-docs)))
|
(define auto-main? (and auto-start-doc? (ormap can-build*? main-docs)))
|
||||||
(define auto-user? (and auto-start-doc? (ormap can-build*? user-docs)))
|
(define auto-user? (and auto-start-doc? (ormap can-build*? user-docs)))
|
||||||
|
@ -109,7 +108,7 @@
|
||||||
docs))))
|
docs))))
|
||||||
(define (make-loop first? iter)
|
(define (make-loop first? iter)
|
||||||
(let ([ht (make-hash)]
|
(let ([ht (make-hash)]
|
||||||
[infos (filter (lambda (i) (not (info-failed? i))) infos)]
|
[infos (filter-not info-failed? infos)]
|
||||||
[src->info (make-hash)])
|
[src->info (make-hash)])
|
||||||
;; Collect definitions
|
;; Collect definitions
|
||||||
(for* ([info infos]
|
(for* ([info infos]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user