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
commitfe3a6566c715cb00cfa050f5313be2613186bd75 (patch)
treed8c65872208bfed264e59b449da91652a81c6094 /align-with-spaces.el
parentb0435ed206a17ee89e3aeecaddbcb48c08d2769d (diff)
Moved 3rd party libs to separate dir and added optional scion haskell support.
--HG-- rename : hoersten-align-with-spaces.el => align-with-spaces.el rename : hoersten-pastebin-region.el => pastebin-region.el rename : color-theme-twilight.el => thirdparty/color-theme-twilight.el rename : pretty-mode.el => thirdparty/pretty-mode.el rename : vala-mode.el => thirdparty/vala-mode.el rename : zencoding-mode.el => thirdparty/zencoding-mode.el
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)