# HG changeset patch # User Richard M. Stallman # Date 897155563 0 # Node ID 6c4756ecd4a29e672ad42f515209b51831afb670 # Parent c3a15ab5924f86e7c3c8b561717997b37e9786bd (string-rectangle-line): Delete the rectangle first. (string-rectangle): Doc fix. diff -r c3a15ab5924f -r 6c4756ecd4a2 lisp/rect.el --- a/lisp/rect.el Fri Jun 05 22:54:28 1998 +0000 +++ b/lisp/rect.el Sat Jun 06 17:52:43 1998 +0000 @@ -227,9 +227,8 @@ ;;;###autoload (defun string-rectangle (start end string) - "Insert STRING on each line of the region-rectangle, shifting text right. -The left edge of the rectangle specifies the column for insertion. -This command does not delete or overwrite any existing text. + "Replace rectangle contents with STRING on each line. +The length of STRING need not be the same as the rectangle width. Called from a program, takes three args; START, END and STRING." (interactive "r\nsString rectangle: ") @@ -238,7 +237,8 @@ (defun string-rectangle-line (startpos begextra endextra) (let (whitespace) - (goto-char startpos) + ;; Delete the width of the rectangle. + (delete-region startpos (point)) ;; Compute horizontal width of following whitespace. (let ((ocol (current-column))) (skip-chars-forward " \t")