summaryrefslogtreecommitdiff
path: root/scheme/racket/geiser/autodoc.rkt
diff options
context:
space:
mode:
Diffstat (limited to 'scheme/racket/geiser/autodoc.rkt')
-rw-r--r--scheme/racket/geiser/autodoc.rkt12
1 files changed, 12 insertions, 0 deletions
diff --git a/scheme/racket/geiser/autodoc.rkt b/scheme/racket/geiser/autodoc.rkt
index 08455e5..04a0c09 100644
--- a/scheme/racket/geiser/autodoc.rkt
+++ b/scheme/racket/geiser/autodoc.rkt
@@ -15,6 +15,7 @@
symbol-documentation
module-exports
update-signature-cache
+ preload-help
get-help)
(require racket/help
@@ -22,9 +23,20 @@
geiser/modules
geiser/locations)
+(define loader-thread #f)
+
+(define (preload-help)
+ (set! loader-thread
+ (thread (lambda ()
+ (with-output-to-string (lambda ()
+ (help meh-i-dont-exist)))))))
+
(define here (current-namespace))
(define (get-help symbol mod)
+ (when loader-thread
+ (thread-wait loader-thread)
+ (set! loader-thread #f))
(if (eq? symbol mod)
(get-mod-help mod)
(with-handlers ([exn? (lambda (_) (eval `(help ,symbol) here))])