forked from purcell/emacs.d
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinit-flyspell.el
31 lines (27 loc) · 1.05 KB
/
init-flyspell.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
;;----------------------------------------------------------------------------
;; Add spell-checking in comments for all programming language modes
;;----------------------------------------------------------------------------
;; Manually exclude `font-lock-string-face' from spell-checking
(setq flyspell-prog-text-faces
'(font-lock-comment-face font-lock-doc-face))
(dolist (hook '(lisp-mode-hook
emacs-lisp-mode-hook
scheme-mode-hook
clojure-mode-hook
ruby-mode-hook
yaml-mode
shell-mode-hook
php-mode-hook
css-mode-hook
haskell-mode-hook
caml-mode-hook
nxml-mode-hook
crontab-mode-hook
perl-mode-hook
tcl-mode-hook
javascript-mode-hook))
(add-hook hook 'flyspell-prog-mode))
(add-hook 'nxml-mode-hook
(lambda ()
(add-to-list 'flyspell-prog-text-faces 'nxml-text-face)))
(provide 'init-flyspell)