From: Agustín Martín Date: Thu, 12 Apr 2012 14:19:40 +0000 (+0200) Subject: textmodes/flyspell.el (flyspell-large-region): Specify encoding for hunspell with... X-Git-Tag: emacs-24.2.90~471^2~364^2~23 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=64a440db710570f2a38cb604ad876d35bc99daab;p=emacs.git textmodes/flyspell.el (flyspell-large-region): Specify encoding for hunspell with ("-i" ENCODING). As done for ispell in in 2012-04-08T17:09:03Z!eliz@gnu.org, in flyspell-large-region we also need to specify encoding for hunspell with ("-i" ENCODING), in 2 separate command-line arguments, as expected by hunspell. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d4217ba1112..1f6b7d3dfaf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2012-04-12 Agustín Martín Domingo + + * textmodes/flyspell.el (flyspell-large-region): For hunspell, use + '("-i" ENCODING), in 2 separate command-line arguments, to specify + the encoding, as expected by hunspell. + 2012-04-12 Stefan Monnier * battery.el (battery--linux-sysfs-regexp): New const. diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 24967ded154..72a3eb474f8 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -1576,10 +1576,11 @@ The buffer to mark them in is `flyspell-large-region-buffer'." (if ispell-encoding8-command (setq args (append args - (list - (concat ispell-encoding8-command - (symbol-name - encoding)))))) + (if ispell-really-hunspell + (list ispell-encoding8-command + (upcase (symbol-name encoding))) + (list (concat ispell-encoding8-command + (symbol-name encoding))))))) (let ((process-coding-system-alist (list (cons "\\.*" encoding)))) (setq c (apply 'ispell-call-process-region beg