From 4d77e0adbbfc6c4dbc43cbf0a69cd6c132621034 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Mon, 25 Nov 2019 16:57:04 +0100 Subject: [PATCH] speller: prefer 'hunspell' over 'spell', because it can handle UTF-8 Also, 'hunspell' is sensitive to the 'LANG' environment variable, so that spell checking will take place for the language that the user is using, instead of always for English. (This is a behavior change, and some people may not like it, expecting the spell check to occur always for English, but... we'll see.) --- src/text.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/text.c b/src/text.c index 815444a1..68cd494b 100644 --- a/src/text.c +++ b/src/text.c @@ -2373,9 +2373,9 @@ const char *do_int_speller(const char *tempfile_name) close(spell_fd[0]); close(spell_fd[1]); - /* Now try to run 'spell', and if that fails, try running 'hunspell'. */ - execlp("spell", "spell", NULL); + /* Try to run 'hunspell'; if that fails, fall back to 'spell'. */ execlp("hunspell", "hunspell", "-l", NULL); + execlp("spell", "spell", NULL); /* Indicate failure when neither speller was found. */ exit(9);