Commits

Yuya Nishihara committed db97391

emacs: enable on-the-fly spell checker

Comments (0)

Files changed (1)

 (if (equal (getenv "LANG") "ja_JP.eucJP")
     (prefer-coding-system 'euc-jp-unix)
   (prefer-coding-system 'utf-8-unix))
+(setq ispell-dictionary "english")
 
 (when (require 'migemo nil t)
   (if (and (not (executable-find "cmigemo"))
              (setq c-argdecl-indent 0)
              (setq c-label-offset -2)
              (c-set-offset 'innamespace 0)
-             (common-highlights)))
+             (common-highlights)
+             (flyspell-prog-mode)))
 (defun my-cc-mode-hook ()
   (require 'xcscope nil t)
   (when (require 'auto-complete-clang nil t)
 ;     (define-key python-mode-map (kbd ".") 'ac-self-insert-and-complete)))
 (add-hook 'python-mode-hook
           '(lambda ()
-             (common-highlights)))
+             (common-highlights)
+             (flyspell-prog-mode)))
 (when (executable-find "ipython")
   (autoload 'py-shell "ipython" "IPython as Python interpreter" t))
 
   (add-hook 'ruby-mode-hook
             '(lambda ()
                (define-key ruby-mode-map "\C-m" 'reindent-then-newline-and-indent)
-               (common-highlights))))
+               (common-highlights)
+               (flyspell-prog-mode))))
 
 ;; sgml mode (for html, xml, etc.) ----
 (add-hook 'sgml-mode-hook
              '("README" . text-mode))
 (add-hook 'text-mode-hook
           '(lambda ()
-             (common-highlights)))
+             (common-highlights)
+             (flyspell-mode 1)))
 
 ;; textile mode ----
 (autoload 'textile-mode "textile-mode"