comparison lisp/indent.el @ 398:74fd4e045ea6 r21-2-29

Import from CVS: tag r21-2-29
author cvs
date Mon, 13 Aug 2007 11:13:30 +0200
parents cc15677e0335
children 697ef44129c6
comparison
equal deleted inserted replaced
397:f4aeb21a5bad 398:74fd4e045ea6
91 This function removes or adds spaces and tabs at beginning of line 91 This function removes or adds spaces and tabs at beginning of line
92 only if necessary. It leaves point at end of indentation." 92 only if necessary. It leaves point at end of indentation."
93 (back-to-indentation) 93 (back-to-indentation)
94 (let ((cur-col (current-column))) 94 (let ((cur-col (current-column)))
95 (cond ((< cur-col column) 95 (cond ((< cur-col column)
96 (if (> (- column (* (/ cur-col tab-width) tab-width)) tab-width) 96 (if (>= (- column (* (/ cur-col tab-width) tab-width)) tab-width)
97 (delete-region (point) 97 (delete-region (point)
98 (progn (skip-chars-backward " ") (point)))) 98 (progn (skip-chars-backward " ") (point))))
99 (indent-to column)) 99 (indent-to column))
100 ((> cur-col column) ; too far right (after tab?) 100 ((> cur-col column) ; too far right (after tab?)
101 (delete-region (progn (move-to-column column t) (point)) 101 (delete-region (progn (move-to-column column t) (point))