diff --git a/pkgs/racket-doc/info.rkt b/pkgs/racket-doc/info.rkt index 5f03ca4a75..8a9b51e731 100644 --- a/pkgs/racket-doc/info.rkt +++ b/pkgs/racket-doc/info.rkt @@ -42,3 +42,5 @@ (define pkg-desc "Base Racket documentation") (define pkg-authors '(eli jay matthias mflatt robby ryanc samth)) + +(define version "1.1") diff --git a/pkgs/racket-doc/scribblings/raco/setup.scrbl b/pkgs/racket-doc/scribblings/raco/setup.scrbl index f61b7c035a..a54079c207 100644 --- a/pkgs/racket-doc/scribblings/raco/setup.scrbl +++ b/pkgs/racket-doc/scribblings/raco/setup.scrbl @@ -2230,13 +2230,16 @@ installation or in a user-specific location, respectively, if @history[#:added "1.1"] -@defproc[(materialize-user-docs [on-setup ((-> boolean?) -> any) (lambda (setup) (setup))]) +@defproc[(materialize-user-docs [on-setup ((-> boolean?) -> any) (lambda (setup) (setup))] + [#:skip-user-doc-check? skip-user-doc-check? any/c #f]) void?]{ Checks whether a user-specific documentation entry point already exists in @racket[(find-user-doc-dir)], and if not, runs @exec{raco setup} in a mode that will create the entry point (to have the same -content as the installation's documentation entry point.) +content as the installation's documentation entry point.) If +@racket[skip-user-doc-check?] is not @racket[#f], then skips the +check for the user-specific documentation entry point. The run of @exec{raco setup} is packaged in a thunk that is provided to @racket[on-setup], which can adjust the current output and error ports @@ -2244,4 +2247,6 @@ as appropriate and check the thunk's result for success. The @racket[on-setup] argument is not called if the documentation entry point already exists in @racket[(find-user-doc-dir)]. + +@history[#:changed "1.1" @list{Added the @racket[skip-user-doc-check?] argument.}] } diff --git a/pkgs/racket-index/setup/materialize-user-docs.rkt b/pkgs/racket-index/setup/materialize-user-docs.rkt index 39515442dd..38c81a7b3b 100644 --- a/pkgs/racket-index/setup/materialize-user-docs.rkt +++ b/pkgs/racket-index/setup/materialize-user-docs.rkt @@ -4,8 +4,10 @@ (provide materialize-user-docs) -(define (materialize-user-docs [wrap-setup (lambda (t) (t))]) - (unless (file-exists? (build-path (find-user-doc-dir) "index.html")) +(define (materialize-user-docs [wrap-setup (lambda (t) (t))] + #:skip-user-doc-check? [skip-user-doc-check? #f]) + (when (or skip-user-doc-check? + (not (file-exists? (build-path (find-user-doc-dir) "index.html")))) (wrap-setup (lambda () (setup #:avoid-main? #t