summaryrefslogtreecommitdiff
path: root/init/km-func.el
diff options
context:
space:
mode:
authorKyle Meyer <meyerkya@gmail.com>2013-02-17 16:13:42 -0500
committerKyle Meyer <meyerkya@gmail.com>2013-02-17 16:14:13 -0500
commit6e693f05f96f7c4546e678621818d2ba6bd90779 (patch)
tree8b7a837a08c607c21d3f28389a4c5a036d49ef0e /init/km-func.el
parentf142a0011d11c669371608093ca5803237fadc6e (diff)
downloademacs.d-6e693f05f96f7c4546e678621818d2ba6bd90779.tar.gz
protect makefile mode from tab cleanup on save
Diffstat (limited to 'init/km-func.el')
-rw-r--r--init/km-func.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/init/km-func.el b/init/km-func.el
index 69b8293..62ee561 100644
--- a/init/km-func.el
+++ b/init/km-func.el
@@ -1,8 +1,10 @@
;; http://whattheemacsd.com/
;; whitespace cleanup
+
(defun km/cleanup-buffer ()
(interactive)
- (untabify (point-min) (point-max))
+ (unless (equal major-mode 'makefile-gmake-mode)
+ (untabify (point-min) (point-max)))
(delete-trailing-whitespace)
(set-buffer-file-coding-system 'utf-8))
(add-hook 'before-save-hook 'km/cleanup-buffer)