From b39bb7e124f984a8fe7f05cce4a7f0d92d22e380 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 8 Apr 2012 20:09:03 +0300 Subject: [PATCH] Fix invocation of Hunspell by ispell.el. lisp/textmodes/ispell.el (ispell-check-version): For hunspell, set ispell-encoding8-command to "-i", without a trailing space. (ispell-start-process): For hunspell, use '("-i" ENCODING), in 2 separate command-line arguments, to specify the encoding, since that's how hunspell expects it. --- lisp/ChangeLog | 8 ++++++++ lisp/textmodes/ispell.el | 11 +++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c2597bc0e55..b769d60402e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2012-04-08 Eli Zaretskii + + * textmodes/ispell.el (ispell-check-version): For hunspell, set + ispell-encoding8-command to "-i", without a trailing space. + (ispell-start-process): For hunspell, use '("-i" ENCODING), in 2 + separate command-line arguments, to specify the encoding, since + that's how hunspell expects it. + 2012-04-08 Glenn Morris * loadup.el: Load bindings before cus-start. diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 64feaa0aeca..75e8bd5a87d 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -874,7 +874,7 @@ Otherwise returns the library directory name, if that is defined." (setq ispell-really-aspell nil))) (ispell-really-hunspell (if (ispell-check-minver hunspell8-minver ispell-really-hunspell) - (setq ispell-encoding8-command "-i ") + (setq ispell-encoding8-command "-i") (setq ispell-really-hunspell nil)))))) result)) @@ -2618,9 +2618,12 @@ Keeps argument list for future ispell invocations for no async support." ;; right encoding for communication. ispell or older aspell/hunspell ;; does not support this. (if ispell-encoding8-command - (list - (concat ispell-encoding8-command - (symbol-name (ispell-get-coding-system))))) + (if ispell-really-hunspell + (list ispell-encoding8-command + (upcase (symbol-name (ispell-get-coding-system)))) + (list + (concat ispell-encoding8-command + (symbol-name (ispell-get-coding-system)))))) ispell-extra-args))) ;; Initially we don't know any buffer's local words. -- 2.39.2