On this page:
load-collections-xref
make-collections-xref
get-rendered-doc-directories
get-current-doc-state
doc-state-changed?
doc-state?

6.13 API for Cross-References for Installed Manuals

 (require setup/xref) package: racket-index

procedure

(load-collections-xref [on-load])  xref?

  on-load : (-> any/c) = (lambda () (void))
Like load-xref, but automatically find all cross-reference files for manuals that have been installed with raco setup.

A cached copy of cross-reference information can be used, in which case on-load is not called.

procedure

(make-collections-xref 
  [#:no-user? no-user? 
  #:no-main? no-main? 
  #:doc-db db-path 
  #:quiet-fail? quiet-fail? 
  #:register-shutdown! register-shutdown!]) 
  xref?
  no-user? : any/c = #f
  no-main? : any/c = #f
  db-path : (or/c #f path?) = #f
  quiet-fail? : any/c = #f
  register-shutdown! : ((-> any) . -> . any) = void
Like load-collections-xref, but takes advantage of a cross-reference database db-path, when support is available, to delay the loading of cross-reference details until needed.

Cross-reference information is skipped when it is installed in the main installation or in a user-specific location, respectively, if no-main? or no-user? is #t.

If quiet-fail? is true, then errors are suppressed while loading cross-reference information.

The register-shutdown! callback may be called to register a function that closes database connections when the result of make-collections-xref is no longer needed. If register-shutdown! is not supplied or if a function sent to register-shutdown! is never called, database connections will be closed only though a custodian.

procedure

(get-rendered-doc-directories no-user?    
  no-main?)  (listof path?)
  no-user? : any/c
  no-main? : any/c
Returns a list of directories for all documentation for all installed collections, omitting documentation that is installed in the main installation or in a user-specific location, respectively, if no-main? or no-user? is #t.

Records the time stamps of files that are touched whenever the documentation is changed.

Added in version 1.2 of package racket-index.

procedure

(doc-state-changed? doc-state)  boolean?

  doc-state : doc-state?
Returns #t when the time stamps of the files in doc-state changed (or new files appeared) and #f otherwise.

If the result is #t, then the documentation in this installation of Racket has changed and otherwise it hasn’t.

Added in version 1.2 of package racket-index.

procedure

(doc-state? v)  boolean?

  v : any/c
A predicate to recognize the result of get-current-doc-state.

Added in version 1.2 of package racket-index.