From: Eli Zaretskii Date: Sat, 6 Nov 2004 12:06:18 +0000 (+0000) Subject: (align-areas): Delete whitespace before reindenting, so X-Git-Tag: ttn-vms-21-2-B4~4162 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=14e32dd3390b7bd60a84c121c023c5d5c0480d99;p=emacs.git (align-areas): Delete whitespace before reindenting, so that tabs are never placed after spaces. --- 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 + + * align.el (align-areas): Delete whitespace before reindenting, so + that tabs are never placed after spaces. + 2004-11-06 Alan Shutko * 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