Function: string-insert-rectangle

string-insert-rectangle is an autoloaded, interactive and byte-compiled function defined in rect.el.gz.

Signature

(string-insert-rectangle START END STRING)

Documentation

Insert STRING on each line of region-rectangle, shifting text right.

When called from a program, the rectangle's corners are START and END. The left edge of the rectangle specifies the column for insertion. This command does not delete or overwrite any existing text.

View in manual

Probably introduced at or before Emacs version 21.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/rect.el.gz
;;;###autoload
(defun string-insert-rectangle (start end string)
  "Insert STRING on each line of region-rectangle, shifting text right.

When called from a program, the rectangle's corners are START and END.
The left edge of the rectangle specifies the column for insertion.
This command does not delete or overwrite any existing text."
  (interactive
   (progn (barf-if-buffer-read-only)
	  (list
	   (region-beginning)
	   (region-end)
	   (read-string (format-prompt "String insert rectangle"
				       (or (car string-rectangle-history) ""))
			nil 'string-rectangle-history
			(car string-rectangle-history)))))
  (apply-on-rectangle 'string-rectangle-line start end string nil))