diff options
author | Agustín Martín <agustin.martin@hispalinux.es> | 2008-12-18 18:44:31 +0000 |
---|---|---|
committer | Agustín Martín <agustin.martin@hispalinux.es> | 2008-12-18 18:44:31 +0000 |
commit | c478e4c527152a98e71454441aa9b3b2e452304c (patch) | |
tree | 41794d9ae67c6691e3a4f0d17330e173bcaad952 /lisp/textmodes/flyspell.el | |
parent | 5a130941052568636884b67b430de9005e530ad9 (diff) | |
download | emacs-c478e4c527152a98e71454441aa9b3b2e452304c.tar.gz |
(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
Diffstat (limited to 'lisp/textmodes/flyspell.el')
-rw-r--r-- | lisp/textmodes/flyspell.el | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 4296861fe61..f8d14227e37 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -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 |