summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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