I'm using flyspell-mode
with ispell
and hunspell
- as the dictionary backend, the problem is: if I type a word, for example you've
or you're
it recognizes ve
and re
as individual words. I want to fix that so it recognizes apostrophes as part of words.
Asked
Active
Viewed 218 times
5
1 Answers
3
This can stem from using Unicode apostrophes (U+2019, ’
) instead of ASCII single quotes ('
), which certain Emacs major/minor modes might substitute automatically.
Have a look at http://www.pertinentdetail.org/IspellCharacterMapsError for one user's detailed solution to this problem using hunspell
. The gist is that both Emacs and the dictionary back end need to be told what extra characters can count as parts of words. I use aspell
, which already handles U+2019, so I just have to tell Emacs to accept the character by adding
(setq ispell-local-dictionary-alist
'((nil "[[:alpha:]]" "[^[:alpha:]]" "['’]" t nil nil utf-8))))
to my .emacs
configuration file. Depending on which dictionary you use, the above arguments may need to be adjusted; see the documentation for ispell-dictionary-alist
for their explanation.

Ryan Riegel
- 31
- 2