diff options
author | Boris Goldowsky <[email protected]> | 1995-03-16 22:36:26 +0000 |
---|---|---|
committer | Boris Goldowsky <[email protected]> | 1995-03-16 22:36:26 +0000 |
commit | ca2a3cb73fbd4f372825c0ed256cdb01577eca80 (patch) | |
tree | 1cd38fe1e7e6dde6d605efbe0e5bb2b79ee92f89 | |
parent | 475f903199bbb603461e326c72fda636497b1e21 (diff) |
(indent-line-to): move to end of indentation, even if it didn't change.
-rw-r--r-- | lisp/indent.el | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lisp/indent.el b/lisp/indent.el index d1777c8681..59112846d7 100644 --- a/lisp/indent.el +++ b/lisp/indent.el @@ -77,15 +77,13 @@ Called from a program, takes three arguments, START, END and ARG." "Indent current line to COLUMN. This function removes or adds spaces and tabs at beginning of line only if necessary. It leaves point at end of indentation." - (beginning-of-line) - (let ((bol (point)) - (cur-col (current-indentation))) - (cond ((> cur-col column) ; too far right (after tab?) + (back-to-indentation) + (let ((cur-col (current-column))) + (cond ((< cur-col column) + (indent-to column)) + ((> cur-col column) ; too far right (after tab?) (delete-region (progn (move-to-column column t) (point)) - (progn (back-to-indentation) (point)))) - ((< cur-col column) - (back-to-indentation) - (indent-to column))))) + (progn (back-to-indentation) (point))))))) (defun current-left-margin () "Return the left margin to use for this line. |