src.nth.io/

summaryrefslogtreecommitdiff
path: root/align-with-spaces.el
diff options
context:
space:
mode:
authorLuke Hoersten <[email protected]>2011-05-14 14:47:51 -0500
committerLuke Hoersten <[email protected]>2011-05-14 14:47:51 -0500
commita1606cb96bab281660253b8431d57ae34d22c000 (patch)
treed8c65872208bfed264e59b449da91652a81c6094 /align-with-spaces.el
parent5167a3947fb5a713a38668414bf99c6263fc9108 (diff)
Moved 3rd party libs to separate dir and added optional scion haskell support.
Diffstat (limited to 'align-with-spaces.el')
-rw-r--r--align-with-spaces.el16
1 files changed, 16 insertions, 0 deletions
diff --git a/align-with-spaces.el b/align-with-spaces.el
new file mode 100644
index 0000000..cf0ad39
--- /dev/null
+++ b/align-with-spaces.el
@@ -0,0 +1,16 @@
+;; ~/.emacs.d/hoersten-align-with-spaces.el
+;; Luke Hoersten <[email protected]>
+
+(global-set-key (kbd "C-c a") 'align-with-spaces)
+(defun align-with-spaces (beg end pattern)
+ "Align selected using only spaces for whitespace."
+ (interactive "r\nsAlign by: ")
+ (let ((indent-tabs-mode nil))
+ (align-string beg end pattern 1)
+ (align-entire beg end)
+ (untabify beg end)
+ (indent-region beg end)
+ (whitespace-cleanup-region beg end)))
+
+(message "Loading align-with-spaces...done")
+(provide 'align-with-spaces)