1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 04:10:54 -08:00

(indent-rigidly): Insert new indent, then delete old.

This commit is contained in:
Richard M. Stallman 1994-08-27 19:40:47 +00:00
parent 5e778cd16a
commit c1194ae809

View file

@ -59,10 +59,14 @@ Called from a program, takes three arguments, START, END and ARG."
(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)))