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)])))))))))
(define (query-aspell line [dict #f])
(unless (aspell-problematic?)
(when dict
(unless (member dict (get-aspell-dicts))
(set! dict #f)))
(start-aspell-thread)
(sync
(nack-guard-evt
(λ (nack-evt)
(define resp (make-channel))
(channel-put aspell-req-chan (list line dict resp nack-evt))
resp)))))
(cond
[(aspell-problematic?)
'()]
[else
(when dict
(unless (member dict (get-aspell-dicts))
(set! dict #f)))
(start-aspell-thread)
(sync
(nack-guard-evt
(λ (nack-evt)
(define resp (make-channel))
(channel-put aspell-req-chan (list line dict resp nack-evt))
resp)))]))
(define aspell-dicts #f)
(define (get-aspell-dicts)