summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2004-11-06 12:06:18 +0000
committerEli Zaretskii <eliz@gnu.org>2004-11-06 12:06:18 +0000
commit14e32dd3390b7bd60a84c121c023c5d5c0480d99 (patch)
tree7c1faf5e9196ef9da81e8df6627aa0edb736e552
parent5ff00c425a07f3bef8fce9c35414df07c3a83f41 (diff)
downloademacs-14e32dd3390b7bd60a84c121c023c5d5c0480d99.tar.gz
(align-areas): Delete whitespace before reindenting, so
that tabs are never placed after spaces.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/align.el8
2 files changed, 13 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 07ee943054c..e80952a256a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2004-11-06 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ * align.el (align-areas): Delete whitespace before reindenting, so
+ that tabs are never placed after spaces.
+
2004-11-06 Alan Shutko <ats@acm.org>
* macros.el (insert-kbd-macro): Do completions based on macros,
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