Merge branch 'master' of github.com:bbatsov/prelude
# Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
This commit is contained in:
commit
89ea1f19f0
2 changed files with 23 additions and 1 deletions
|
@ -53,6 +53,12 @@
|
|||
:type 'boolean
|
||||
:group 'prelude)
|
||||
|
||||
(defcustom prelude-clean-whitespace-on-save t
|
||||
"Cleanup whitespace from file before it's saved. Will only occur if prelude-whitespace is also enabled"
|
||||
:type 'boolean
|
||||
:group 'prelude
|
||||
)
|
||||
|
||||
(defcustom prelude-flyspell t
|
||||
"Non-nil values enable Prelude's flyspell support."
|
||||
:type 'boolean
|
||||
|
@ -218,10 +224,13 @@
|
|||
(when (and prelude-flyspell (executable-find ispell-program-name))
|
||||
(flyspell-mode +1)))
|
||||
|
||||
(defun prelude-cleanup-maybe ()
|
||||
(when prelude-clean-whitespace-on-save (whitespace-cleanup)))
|
||||
|
||||
(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)
|
||||
(add-hook 'before-save-hook 'prelude-cleanup-maybe nil t)
|
||||
(whitespace-mode +1)))
|
||||
|
||||
(add-hook 'text-mode-hook 'prelude-enable-flyspell)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue