reenabled whitespace-mode by default and made it a lot less intrusive

This commit is contained in:
Bozhidar Batsov 2012-12-23 11:24:55 +02:00
parent 61f53e6d06
commit 152546ff48
3 changed files with 12 additions and 8 deletions

View file

@ -235,14 +235,14 @@ P.S. Solarized is not available by default - you'll have to install it from MELP
Fork the official Prelude repo and add your own touch to it. You're advised to avoid changing stuff outside of the Fork the official Prelude repo and add your own touch to it. You're advised to avoid changing stuff outside of the
personal folder to avoid having to deal with git merge conflicts in the future. personal folder to avoid having to deal with git merge conflicts in the future.
#### Enabling whitespace-mode #### Disabling whitespace-mode
Although `whitespace-mode` is awesome some people find it too Although `whitespace-mode` is awesome some people might find it too
intrusive so it's disabled by default. You can enable it in your intrusive. You can disable it in your
personal config with the following bit of code: personal config with the following bit of code:
```lisp ```lisp
(setq prelude-whitespace t) (setq prelude-whitespace nil)
``` ```
#### Disable flyspell-mode #### Disable flyspell-mode

View file

@ -48,7 +48,7 @@
:type 'boolean :type 'boolean
:group 'prelude) :group 'prelude)
(defcustom prelude-whitespace nil (defcustom prelude-whitespace t
"Non-nil values enable Prelude's whitespace visualization." "Non-nil values enable Prelude's whitespace visualization."
:type 'boolean :type 'boolean
:group 'prelude) :group 'prelude)
@ -321,6 +321,10 @@ indent yanked text (with prefix arg don't indent)."
(add-hook 'after-save-hook (add-hook 'after-save-hook
'executable-make-buffer-file-executable-if-script-p) 'executable-make-buffer-file-executable-if-script-p)
;; whitespace-mode config
(setq whitespace-line-column 80) ;; limit line length
(setq whitespace-style '(face tabs empty trailing lines-tail))
;; saner regex syntax ;; saner regex syntax
(require 're-builder) (require 're-builder)
(setq reb-re-syntax 'string) (setq reb-re-syntax 'string)

View file

@ -115,11 +115,11 @@
(when prelude-guru (when prelude-guru
(guru-mode +1)) (guru-mode +1))
(when prelude-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)) (whitespace-mode +1))
(prelude-local-comment-auto-fill) (prelude-local-comment-auto-fill)
(prelude-add-watchwords) (prelude-add-watchwords))
;; keep the whitespace decent all the time (in this buffer)
(add-hook 'before-save-hook 'whitespace-cleanup nil t))
(setq prelude-prog-mode-hook 'prelude-prog-mode-defaults) (setq prelude-prog-mode-hook 'prelude-prog-mode-defaults)