From: Don Armstrong Date: Tue, 14 Sep 2010 22:25:03 +0000 (+0000) Subject: * add flyspell-mode auto-on code X-Git-Url: https://git.donarmstrong.com/?p=home-base.git;a=commitdiff_plain;h=2b5ef98465df8228456af2906bd44d8f2eaabaa8 * add flyspell-mode auto-on code --- diff --git a/.emacs b/.emacs index 6a74dbe..abf0761 100644 --- a/.emacs +++ b/.emacs @@ -266,3 +266,15 @@ (setq org-log-done 'time) (setq org-log-done 'note) (setq org-agenda-ndays 5) + + +(autoload 'flyspell-mode "flyspell" "On-the-fly spelling checker." t) +(add-hook 'message-mode-hook 'turn-on-flyspell) +(add-hook 'text-mode-hook 'turn-on-flyspell) +(add-hook 'c-mode-common-hook 'flyspell-prog-mode) +(add-hook 'cperl-mode-hook 'flyspell-prog-mode) +(add-hook 'tcl-mode-hook 'flyspell-prog-mode) +(defun turn-on-flyspell () + "Force flyspell-mode on using a positive arg. For use in hooks." + (interactive) + (flyspell-mode 1)) \ No newline at end of file