Skip to content
Browse files

Merge pull request #5 from edmccard/clean-exit

Turn off whitespace handling when mode is turned off
  • Loading branch information...
2 parents 91d8b2c + 9f6a302 commit f62930ef899cad35ac9afcdefe419f0837d2dc2f Ethan Glasser-Camp committed Feb 21, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 lisp/ethan-wspace.el
View
7 lisp/ethan-wspace.el
@@ -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 'post-command-hook 'ethan-wspace-command-hook t)
(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 ()
(interactive)
@@ -725,6 +726,10 @@ This just activates each whitespace type in this buffer."
(ethan-wspace-type-deactivate 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 ()
"*Turn on clean mode for all whitespace modes."
(interactive)

0 comments on commit f62930e

Please sign in to comment.
Something went wrong with that request. Please try again.