From 14e32dd3390b7bd60a84c121c023c5d5c0480d99 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 6 Nov 2004 12:06:18 +0000 Subject: (align-areas): Delete whitespace before reindenting, so that tabs are never placed after spaces. --- lisp/align.el | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lisp/align.el') diff --git a/lisp/align.el b/lisp/align.el index bae09d749db..5e739c8f7c0 100644 --- a/lisp/align.el +++ b/lisp/align.el @@ -1212,6 +1212,14 @@ have been aligned. No changes will be made to the buffer." (cond ((< gocol 0) t) ; don't do anything ((= cur gocol) t) ; don't need to ((< cur gocol) ; just add space + ;; FIXME: It is stated above that "...the + ;; whitespace to be modified was already + ;; deleted by `align-region', all we have + ;; to do here is indent." However, this + ;; doesn't seem to be true, so we first + ;; delete the whitespace to avoid tabs + ;; after spaces. + (delete-horizontal-space t) (indent-to gocol)) (t ;; This code works around an oddity in the -- cgit v1.2.1