summaryrefslogtreecommitdiff
path: root/lisp/rect.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2002-02-26 16:05:48 +0000
committerRichard M. Stallman <rms@gnu.org>2002-02-26 16:05:48 +0000
commit7dfee0293db4f22fa771a8f68f7bdf45c4accec8 (patch)
tree28a921995a5df66f2548f04a812e11b8632730e4 /lisp/rect.el
parent8caa4ef5bd8ba4a0e3ebdeddedad1e182bdb27bb (diff)
downloademacs-7dfee0293db4f22fa771a8f68f7bdf45c4accec8.tar.gz
(clear-rectangle-line): Reindent to the same column
that move-to-column reached when it tried to go to endcol.
Diffstat (limited to 'lisp/rect.el')
-rw-r--r--lisp/rect.el7
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/rect.el b/lisp/rect.el
index 3c5ea78a36f..84094cdb6ea 100644
--- a/lisp/rect.el
+++ b/lisp/rect.el
@@ -367,8 +367,7 @@ rectangle which were empty."
(apply-on-rectangle 'clear-rectangle-line start end fill))
(defun clear-rectangle-line (startcol endcol fill)
- (let ((pt (point-at-eol))
- spaces)
+ (let ((pt (point-at-eol)))
(when (= (move-to-column startcol (or fill 'coerce)) startcol)
(if (and (not fill)
(<= (save-excursion (goto-char pt) (current-column)) endcol))
@@ -376,9 +375,9 @@ rectangle which were empty."
;; else
(setq pt (point))
(move-to-column endcol t)
- (setq spaces (- (point) pt))
+ (setq endcol (current-column))
(delete-region pt (point))
- (indent-to (+ (current-column) spaces))))))
+ (indent-to endcol)))))
(provide 'rect)