comparison lisp/indent.el @ 424:11054d720c21 r21-2-20

Import from CVS: tag r21-2-20
author cvs
date Mon, 13 Aug 2007 11:26:11 +0200
parents 697ef44129c6
children
comparison
equal deleted inserted replaced
423:28d9c139be4c 424:11054d720c21
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))