# HG changeset patch # User Richard M. Stallman # Date 1014739548 0 # Node ID c33c91ae60fce272b2382f8c3e8f6d41b631faab # Parent b785a21f5738ae70eb22cdd9b84e1e772416210d (clear-rectangle-line): Reindent to the same column that move-to-column reached when it tried to go to endcol. diff -r b785a21f5738 -r c33c91ae60fc lisp/rect.el --- a/lisp/rect.el Tue Feb 26 16:05:35 2002 +0000 +++ b/lisp/rect.el Tue Feb 26 16:05:48 2002 +0000 @@ -367,8 +367,7 @@ (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 @@ ;; 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)