6

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.

1 Answer 1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.