comparison lisp/indent.el @ 412:697ef44129c6 r21-2-14

Import from CVS: tag r21-2-14
author cvs
date Mon, 13 Aug 2007 11:20:41 +0200
parents 74fd4e045ea6
children 11054d720c21
comparison
equal deleted inserted replaced
411:12e008d41344 412:697ef44129c6
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))