Question

I recently switched to emacs24 and upgraded to Ubuntu 12.04. I can't seem to get hunspell working correctly again. I find hunspell to be better than aspell generally. Hunspell only wants to use the Australian dictionary and not English US dictionary or freezes up my system. With aspell I have no problem switching dictionaries or running flyspell mode.

My question is how do people have setup interactive spelling in emacs24?? Still using ispell and flyspell or any other setups preferred. Are you using hunspell with emacs24? I may continue to try to get this working but want to confirm elsewhere people don't have any issues.

Was it helpful?

Solution

I use hunspell on OS X (installed via homebrew) with Emacs 24 built from bzr. The relevant portions of my .emacs are below. I have not switched dictionaries however, so I can't help with that. It took me a while to get things set up, and it was a while ago so I don't remember why everything is the way it is.

(setq-default ispell-program-name "hunspell")
(setq ispell-dictionary "american"
  ispell-extra-args '() ;; TeX mode "-t"
  ispell-silently-savep t
  )

(setq flyspell-mode-map nil)

(add-hook 'ispell-initialize-spellchecker-hook
      (lambda ()
    (setq ispell-base-dicts-override-alist
          '((nil ; default
         "[A-Za-z]" "[^A-Za-z]" "[']" t
         ("-d" "en_US" "-i" "utf-8") nil utf-8)
        ("american" ; Yankee English
         "[A-Za-z]" "[^A-Za-z]" "[']" t
         ("-d" "en_US" "-i" "utf-8") nil utf-8)
        ("british" ; British English
         "[A-Za-z]" "[^A-Za-z]" "[']" t
         ("-d" "en_GB" "-i" "utf-8") nil utf-8)))))
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top