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.)
master
Benno Schulenberg 2019-11-25 16:57:04 +01:00
parent 2b8a73348c
commit 4d77e0adbb
1 changed files with 2 additions and 2 deletions

View File

@ -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);