comparison lisp/align.el @ 57972:fc790bd5db8f

(align-areas): Delete whitespace before reindenting, so that tabs are never placed after spaces.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 06 Nov 2004 12:04:55 +0000
parents 695cf19ef79e
children c919a3aa031f cb7f41387eb3
comparison
equal deleted inserted replaced
57971:c6da09b5384b 57972:fc790bd5db8f
1210 (setq gocol (- col (- ecol (current-column)))))) 1210 (setq gocol (- col (- ecol (current-column))))))
1211 (setq cur (current-column)) 1211 (setq cur (current-column))
1212 (cond ((< gocol 0) t) ; don't do anything 1212 (cond ((< gocol 0) t) ; don't do anything
1213 ((= cur gocol) t) ; don't need to 1213 ((= cur gocol) t) ; don't need to
1214 ((< cur gocol) ; just add space 1214 ((< cur gocol) ; just add space
1215 ;; FIXME: It is stated above that "...the
1216 ;; whitespace to be modified was already
1217 ;; deleted by `align-region', all we have
1218 ;; to do here is indent." However, this
1219 ;; doesn't seem to be true, so we first
1220 ;; delete the whitespace to avoid tabs
1221 ;; after spaces.
1222 (delete-horizontal-space t)
1215 (indent-to gocol)) 1223 (indent-to gocol))
1216 (t 1224 (t
1217 ;; This code works around an oddity in the 1225 ;; This code works around an oddity in the
1218 ;; FORCE argument of `move-to-column', which 1226 ;; FORCE argument of `move-to-column', which
1219 ;; tends to screw up markers if there is any 1227 ;; tends to screw up markers if there is any