fix query-aspell so that it returns an empty list when aspell isn't working

This commit is contained in:
Robby Findler 2012-12-02 14:42:31 -06:00
parent 545191fcec
commit 9f72eb396a

View File

@ -197,19 +197,21 @@
(loop)]))))))))) (loop)])))))))))
(define (query-aspell line [dict #f]) (define (query-aspell line [dict #f])
(unless (aspell-problematic?) (cond
[(aspell-problematic?)
'()]
[else
(when dict
(unless (member dict (get-aspell-dicts))
(set! dict #f)))
(when dict (start-aspell-thread)
(unless (member dict (get-aspell-dicts)) (sync
(set! dict #f))) (nack-guard-evt
(λ (nack-evt)
(start-aspell-thread) (define resp (make-channel))
(sync (channel-put aspell-req-chan (list line dict resp nack-evt))
(nack-guard-evt resp)))]))
(λ (nack-evt)
(define resp (make-channel))
(channel-put aspell-req-chan (list line dict resp nack-evt))
resp)))))
(define aspell-dicts #f) (define aspell-dicts #f)
(define (get-aspell-dicts) (define (get-aspell-dicts)