move setup/xref from "scribble-lib" to "racket-index"

The `setup/xref` library conceptually belongs in "racket-index",
and moving the library avoids a cross-package use of a private
module.

Merge to v6.0

original commit: d37e910169622364a10cdd34f00ade99ee216a77
This commit is contained in:
Matthew Flatt 2013-12-01 08:09:07 -07:00
parent a2e217a846
commit 0957baea77

View File

@ -16,8 +16,7 @@
"coroutine.rkt"
data/queue)
(require setup/xref
scribble/xref
(require scribble/xref
scribble/manual-struct)
(import mred^
@ -4030,8 +4029,15 @@ designates the character that triggers autocompletion
(let* ([sym->mpi (λ (mp) (module-path-index-resolve (module-path-index-join mp #f)))]
[manual-mpis (and manuals (map sym->mpi manuals))])
(unless xref
(set! xref (load-collections-xref)))
(unless xref
(let ([load-collections-xref
;; Make the dependency on `setup/xref' indirect, so that a
;; GUI does not depend on having documentation installed:
(with-handlers ([exn:missing-module? (lambda (exn)
(lambda ()
(load-xref null)))])
(dynamic-require 'setup/xref 'load-collections-xref))])
(set! xref (load-collections-xref))))
(let ([ht (make-hash)])
(for-each