* add flyspell-mode auto-on code
authorDon Armstrong <don@donarmstrong.com>
Tue, 14 Sep 2010 22:25:03 +0000 (22:25 +0000)
committerDon Armstrong <don@donarmstrong.com>
Tue, 14 Sep 2010 22:25:03 +0000 (22:25 +0000)
.emacs

diff --git a/.emacs b/.emacs
index 6a74dbe..abf0761 100644 (file)
--- a/.emacs
+++ b/.emacs
 (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