From 77f528025e22810a9c23b60c26f2534577f9c892 Mon Sep 17 00:00:00 2001
From: Kyle Meyer <kyle@kyleam.com>
Date: Sat, 8 Nov 2014 00:47:59 -0500
Subject: Rewrite toggle-prevent-cleanup

---
 lisp/init-editing.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'lisp')

diff --git a/lisp/init-editing.el b/lisp/init-editing.el
index 0d20d82..4ff5a8b 100644
--- a/lisp/init-editing.el
+++ b/lisp/init-editing.el
@@ -45,10 +45,10 @@
 (defun km/toggle-prevent-cleanup ()
   "Toggle state of `km/prevent-cleanup'"
   (interactive)
-  (let ((state t))
-    (when km/prevent-cleanup
-        (setq state nil))
-    (set (make-local-variable 'km/prevent-cleanup) state)))
+  (if km/prevent-cleanup
+      (message "Allowing cleanup on save ")
+    (message "Preventing cleanup on save"))
+  (set (make-local-variable 'km/prevent-cleanup) (not km/prevent-cleanup)))
 
 (defun km/cleanup-buffer ()
   (interactive)
-- 
cgit v1.2.3