Skip to content

Commit

Permalink
Merge pull request #5 from edmccard/clean-exit
Browse files Browse the repository at this point in the history
Turn off whitespace handling when mode is turned off
  • Loading branch information
Ethan Glasser-Camp committed Feb 21, 2012
2 parents 91d8b2c + 9f6a302 commit f62930e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lisp/ethan-wspace.el
Expand Up @@ -716,7 +716,8 @@ This just activates each whitespace type in this buffer."
(remove-hook 'pre-command-hook 'ethan-wspace-pre-command-hook t) (remove-hook 'pre-command-hook 'ethan-wspace-pre-command-hook t)
(remove-hook 'post-command-hook 'ethan-wspace-command-hook t) (remove-hook 'post-command-hook 'ethan-wspace-command-hook t)
(remove-hook 'hack-local-variables-hook (remove-hook 'hack-local-variables-hook
(function ethan-wspace-hack-local-variables-hook) t))) (function ethan-wspace-hack-local-variables-hook) t)
(ethan-wspace-clean-exit)))


(defun ethan-wspace-update-buffer () (defun ethan-wspace-update-buffer ()
(interactive) (interactive)
Expand All @@ -725,6 +726,10 @@ This just activates each whitespace type in this buffer."
(ethan-wspace-type-deactivate type) (ethan-wspace-type-deactivate type)
(ethan-wspace-type-activate type)))) (ethan-wspace-type-activate type))))


(defun ethan-wspace-clean-exit ()
(dolist (type (ethan-wspace-all-error-types))
(ethan-wspace-type-deactivate type)))

(defun ethan-wspace-clean-all-modes () (defun ethan-wspace-clean-all-modes ()
"*Turn on clean mode for all whitespace modes." "*Turn on clean mode for all whitespace modes."
(interactive) (interactive)
Expand Down

0 comments on commit f62930e

Please sign in to comment.