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:
parent
5a13094105
commit
c478e4c527
2 changed files with 45 additions and 19 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue