find aspell like ispell
svn: r3072
This commit is contained in:
parent
4a0d8018b1
commit
684e4baf24
|
@ -94,19 +94,21 @@
|
||||||
|
|
||||||
(define (clean-up to-send)
|
(define (clean-up to-send)
|
||||||
;; Drop characters that ispell or aspell may treat as word
|
;; Drop characters that ispell or aspell may treat as word
|
||||||
;; delimiters. We can to keep ' in a word, but double
|
;; delimiters. We can to keep ' in a word, but double or leading
|
||||||
;; '' counts as a delimiter, so end by replacing those.
|
;; '' counts as a delimiter, so end by replacing those.
|
||||||
(regexp-replace* #rx"''+"
|
(regexp-replace* #rx"^'"
|
||||||
(list->string
|
(regexp-replace* #rx"''+"
|
||||||
(map (lambda (b)
|
(list->string
|
||||||
(if (and ((char->integer b) . <= . 127)
|
(map (lambda (b)
|
||||||
(or (char-alphabetic? b)
|
(if (and ((char->integer b) . <= . 127)
|
||||||
(char-numeric? b)
|
(or (char-alphabetic? b)
|
||||||
(eq? b #\')))
|
(char-numeric? b)
|
||||||
b
|
(eq? b #\')))
|
||||||
#\x))
|
b
|
||||||
(string->list to-send)))
|
#\x))
|
||||||
"x"))
|
(string->list to-send)))
|
||||||
|
"x")
|
||||||
|
""))
|
||||||
|
|
||||||
(define has-ispell? 'dontknow)
|
(define has-ispell? 'dontknow)
|
||||||
(define ispell-prog #f)
|
(define ispell-prog #f)
|
||||||
|
@ -119,11 +121,15 @@
|
||||||
"ispell.exe"
|
"ispell.exe"
|
||||||
"ispell")
|
"ispell")
|
||||||
#f)
|
#f)
|
||||||
(ormap (lambda (x) (and (file-exists? x) x))
|
(ormap (lambda (ispell)
|
||||||
'("/sw/bin/ispell"
|
(ormap (lambda (x)
|
||||||
"/usr/bin/ispell"
|
(let ([x (build-path x ispell)])
|
||||||
"/bin/ispell"
|
(and (file-exists? x) x)))
|
||||||
"/usr/local/bin/ispell"))
|
'("/sw/bin"
|
||||||
|
"/usr/bin"
|
||||||
|
"/bin"
|
||||||
|
"/usr/local/bin")))
|
||||||
|
'("ispell" "aspell"))
|
||||||
(find-executable-path (if (eq? (system-type) 'windows)
|
(find-executable-path (if (eq? (system-type) 'windows)
|
||||||
"aspell.exe"
|
"aspell.exe"
|
||||||
"aspell")
|
"aspell")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user