enable whitespace-mode in modes derived from text-mode
This commit is contained in:
parent
26259d90b8
commit
f242489747
2 changed files with 8 additions and 5 deletions
|
@ -218,8 +218,14 @@
|
||||||
(when (and prelude-flyspell (executable-find ispell-program-name))
|
(when (and prelude-flyspell (executable-find ispell-program-name))
|
||||||
(flyspell-mode +1)))
|
(flyspell-mode +1)))
|
||||||
|
|
||||||
(add-hook 'message-mode-hook 'prelude-enable-flyspell)
|
(defun prelude-enable-whitespace ()
|
||||||
|
(when prelude-whitespace
|
||||||
|
;; keep the whitespace decent all the time (in this buffer)
|
||||||
|
(add-hook 'before-save-hook 'whitespace-cleanup nil t)
|
||||||
|
(whitespace-mode +1)))
|
||||||
|
|
||||||
(add-hook 'text-mode-hook 'prelude-enable-flyspell)
|
(add-hook 'text-mode-hook 'prelude-enable-flyspell)
|
||||||
|
(add-hook 'text-mode-hook 'prelude-enable-whitespace)
|
||||||
|
|
||||||
;; enable narrowing commands
|
;; enable narrowing commands
|
||||||
(put 'narrow-to-region 'disabled nil)
|
(put 'narrow-to-region 'disabled nil)
|
||||||
|
|
|
@ -116,10 +116,7 @@
|
||||||
(flyspell-prog-mode))
|
(flyspell-prog-mode))
|
||||||
(when prelude-guru
|
(when prelude-guru
|
||||||
(guru-mode +1))
|
(guru-mode +1))
|
||||||
(when prelude-whitespace
|
(prelude-enable-whitespace)
|
||||||
;; keep the whitespace decent all the time (in this buffer)
|
|
||||||
(add-hook 'before-save-hook 'whitespace-cleanup nil t)
|
|
||||||
(whitespace-mode +1))
|
|
||||||
(flycheck-mode +1)
|
(flycheck-mode +1)
|
||||||
(prelude-local-comment-auto-fill)
|
(prelude-local-comment-auto-fill)
|
||||||
(prelude-add-watchwords))
|
(prelude-add-watchwords))
|
||||||
|
|
Loading…
Reference in a new issue