Mercurial > hg > xemacs-beta
comparison lisp/indent.el @ 355:182f72e8cd0d r21-1-7
Import from CVS: tag r21-1-7
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:56:21 +0200 |
parents | 41ff10fd062f |
children | cc15677e0335 |
comparison
equal
deleted
inserted
replaced
354:3729bef672e0 | 355:182f72e8cd0d |
---|---|
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)) |