comparison lisp/indent.el @ 371:cc15677e0335 r21-2b1

Import from CVS: tag r21-2b1
author cvs
date Mon, 13 Aug 2007 11:03:08 +0200
parents 182f72e8cd0d
children 74fd4e045ea6
comparison
equal deleted inserted replaced
370:bd866891f083 371:cc15677e0335
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))