]> git.eshelyaron.com Git - emacs.git/commitdiff
(align-areas): Delete whitespace before reindenting, so
authorEli Zaretskii <eliz@gnu.org>
Sat, 6 Nov 2004 12:06:18 +0000 (12:06 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 6 Nov 2004 12:06:18 +0000 (12:06 +0000)
that tabs are never placed after spaces.

lisp/ChangeLog
lisp/align.el

index 07ee943054cb56c258664aa552f3b3ea6bddff17..e80952a256a031fc1f080589033469a37a3a0744 100644 (file)
@@ -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,
index bae09d749db62ebcb7a1686292df806b04c9f6d1..5e739c8f7c03ef8b3c2c06194fbb692751c74ea7 100644 (file)
@@ -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