fix query-aspell so that it returns an empty list when aspell isn't working
This commit is contained in:
parent
545191fcec
commit
9f72eb396a
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user