GNU Emacs 24.5.1 (Mac OS X 11.10) 内でスペル チェックを有効にしたいと考えています。私は次のことをしました:
1) brew install hunspell
2) cd ~/Library/Spelling
wget http://cgit.freedesktop.org/libreoffice/dictionaries/plain/en/en_US.aff
wget http://cgit.freedesktop.org/libreoffice/dictionaries/plain/en/en_US.dic
(hunspell -D
端末から正しく実行されます)。~/.bash_profile
I setexport DICTIONARY=en_US
と my show ~/.emacs
:
;; Activate Hunspell
(when (executable-find "hunspell")
(setq-default ispell-program-name "/usr/local/bin/hunspell")
(setq ispell-really-hunspell t))
;; Activate flyspell
(add-hook 'text-mode-hook 'flyspell-mode)
(add-hook 'message-mode-hook 'flyspell-mode)
(setq flyspell-issue-message-flag nil)
(mapcar (lambda (mode-hook) (add-hook mode-hook 'flyspell-prog-mode))
'(c-mode-common-hook R-mode-hook emacs-lisp-mode-hook))
ただし、.txt
ファイルを開くと、下線が引かれたスペルチェックエラーなどM-x ispell
は表示されず、 ispell-parse-hunspell-affix-file: ispell-phaf: No matching entry for nil.
. どうすればこれを機能させることができますか?