Mercurial > emacs
changeset 8642:ae3b75bae5d7
(indent-rigidly): Insert new indent, then delete old.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 27 Aug 1994 19:40:47 +0000 |
parents | f84dbccdff87 |
children | e98aa03e22c5 |
files | lisp/indent.el |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/indent.el Sat Aug 27 19:06:19 1994 +0000 +++ b/lisp/indent.el Sat Aug 27 19:40:47 1994 +0000 @@ -59,10 +59,14 @@ (goto-char start) (or (bolp) (forward-line 1)) (while (< (point) end) - (let ((indent (current-indentation))) - (delete-region (point) (progn (skip-chars-forward " \t") (point))) - (or (eolp) - (indent-to (max 0 (+ indent arg)) 0))) + (let ((indent (current-indentation)) + eol-flag) + (save-excursion + (skip-chars-forward " \t") + (setq eol-flag (eolp))) + (or eol-flag + (indent-to (max 0 (+ indent arg)) 0)) + (delete-region (point) (progn (skip-chars-forward " \t") (point)))) (forward-line 1)) (move-marker end nil)))