diff options
-rw-r--r-- | scheme/racket/geiser/autodoc.rkt | 12 | ||||
-rw-r--r-- | scheme/racket/geiser/user.rkt | 4 |
2 files changed, 12 insertions, 4 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))]) diff --git a/scheme/racket/geiser/user.rkt b/scheme/racket/geiser/user.rkt index 9b07b95..b3112f2 100644 --- a/scheme/racket/geiser/user.rkt +++ b/scheme/racket/geiser/user.rkt @@ -96,10 +96,6 @@ (define (geiser-prompt-read prompt) (make-repl-reader (geiser-read prompt))) -(define (preload-help) - (thread (lambda () - (with-output-to-string (lambda () (help meh-i-dont-exist)))))) - (define (init-geiser-repl) (compile-enforce-module-constants #f) (current-load/use-compiled geiser-loader) |