summaryrefslogtreecommitdiff
path: root/conf
diff options
context:
space:
mode:
Diffstat (limited to 'conf')
-rw-r--r--conf/em.el12
1 files changed, 10 insertions, 2 deletions
diff --git a/conf/em.el b/conf/em.el
index 12a9083..6441ce0 100644
--- a/conf/em.el
+++ b/conf/em.el
@@ -27,8 +27,8 @@
;; make whitespace-mode use just basic coloring
;; http://ergoemacs.org/emacs/whitespace-mode.html
(setq whitespace-style (quote
- (spaces tabs newline space-mark
- tab-mark newline-mark)))
+ (spaces tabs newline space-mark
+ tab-mark newline-mark)))
;; y or n
(defalias 'yes-or-no-p 'y-or-n-p)
@@ -96,3 +96,11 @@
;; tramp
(require 'tramp)
(setq tramp-default-method "ssh")
+
+;; whitespace cleanup
+(defun cleanup-buffer ()
+ (interactive)
+ (untabify (point-min) (point-max))
+ (delete-trailing-whitespace)
+ (set-buffer-file-coding-system 'utf-8))
+(add-hook 'before-save-hook 'cleanup-buffer)