Interactive Spell Checking Programs Available for emacs

南楼画角 提交于 2019-12-12 11:50:44

问题


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.


回答1:


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


来源:https://stackoverflow.com/questions/11626363/interactive-spell-checking-programs-available-for-emacs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!