1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

(ispell-really-hunspell): new variable to signal hunspell

(ispell-check-version):
Check if hunspell and set ispell-really-hunspell if needed
(ispell-send-string), (ispell-start-process), (flyspell-large-region):
Pass right options for hunspell if needed
This commit is contained in:
Agustín Martín 2008-12-18 18:44:31 +00:00
parent 5a13094105
commit c478e4c527
2 changed files with 45 additions and 19 deletions

View file

@ -1526,6 +1526,7 @@ The buffer to mark them in is `flyspell-large-region-buffer'."
(or ispell-local-pdict ispell-personal-dictionary))
(let ((args (ispell-get-ispell-args))
(encoding (ispell-get-coding-system))
encoding-command
c)
(if (and ispell-current-dictionary ; use specified dictionary
(not (member "-d" args))) ; only define if not overridden
@ -1538,14 +1539,21 @@ The buffer to mark them in is `flyspell-large-region-buffer'."
(expand-file-name
ispell-current-personal-dictionary)))))
(setq args (append args ispell-extra-args))
(if (and ispell-really-aspell
ispell-aspell-supports-utf8)
;; If we are using recent aspell or hunspell, make sure we use the right encoding
;; for communication. ispell or older aspell/hunspell does not support this
(if (or (and ispell-really-aspell
ispell-aspell-supports-utf8
(setq encoding-command "--encoding="))
(and ispell-really-hunspell
(setq encoding-command "-i ")))
(setq args
(append args
(list
(concat "--encoding="
(concat encoding-command
(symbol-name
encoding))))))
(let ((process-coding-system-alist (list (cons "\\.*" encoding))))
(setq c (apply 'ispell-call-process-region beg
end