From a73af1ec9b611b5f29ed5c20b0dcf48cbeddc7ac Mon Sep 17 00:00:00 2001 From: Luke Hoersten Date: Mon, 29 Nov 2010 11:40:31 -0600 Subject: Added align-with-spaces require. --- hoersten-align-with-spaces.el | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 hoersten-align-with-spaces.el (limited to 'hoersten-align-with-spaces.el') diff --git a/hoersten-align-with-spaces.el b/hoersten-align-with-spaces.el new file mode 100644 index 0000000..fd4806d --- /dev/null +++ b/hoersten-align-with-spaces.el @@ -0,0 +1,16 @@ +;; ~/.emacs.d/hoersten-align-with-spaces.el +;; Luke Hoersten + +(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 "Loaded Hoersten align-with-spaces function") +(provide 'hoersten-align-with-spaces) -- cgit v1.2.3