aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman1994-08-27 19:40:47 +0000
committerRichard M. Stallman1994-08-27 19:40:47 +0000
commitc1194ae809da0a5c435bd10fcf3ff4248bd3c869 (patch)
tree6be94041f7d097d2524941d3474bf81c540f2d8b /lisp
parent5e778cd16a92ecd30c28b51fedd6840b04832f02 (diff)
downloademacs-c1194ae809da0a5c435bd10fcf3ff4248bd3c869.tar.gz
emacs-c1194ae809da0a5c435bd10fcf3ff4248bd3c869.zip
(indent-rigidly): Insert new indent, then delete old.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/indent.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/indent.el b/lisp/indent.el
index f869b175f75..27270fb4110 100644
--- a/lisp/indent.el
+++ b/lisp/indent.el
@@ -59,10 +59,14 @@ Called from a program, takes three arguments, START, END and ARG."
59 (goto-char start) 59 (goto-char start)
60 (or (bolp) (forward-line 1)) 60 (or (bolp) (forward-line 1))
61 (while (< (point) end) 61 (while (< (point) end)
62 (let ((indent (current-indentation))) 62 (let ((indent (current-indentation))
63 (delete-region (point) (progn (skip-chars-forward " \t") (point))) 63 eol-flag)
64 (or (eolp) 64 (save-excursion
65 (indent-to (max 0 (+ indent arg)) 0))) 65 (skip-chars-forward " \t")
66 (setq eol-flag (eolp)))
67 (or eol-flag
68 (indent-to (max 0 (+ indent arg)) 0))
69 (delete-region (point) (progn (skip-chars-forward " \t") (point))))
66 (forward-line 1)) 70 (forward-line 1))
67 (move-marker end nil))) 71 (move-marker end nil)))
68 72