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:
parent
5e778cd16a
commit
c1194ae809
1 changed files with 8 additions and 4 deletions
|
|
@ -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)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue