Function: delete-rectangle

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

Signature

(delete-rectangle START END &optional FILL)

Documentation

Delete (don't save) text in the region-rectangle.

The same range of columns is deleted in each line starting with the line where the region begins and ending with the line where the region ends.

When called from a program the rectangle's corners are START and END. With a prefix (or a FILL) argument, also fill lines where nothing has to be deleted.

View in manual

Probably introduced at or before Emacs version 1.7.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/rect.el.gz
;;;###autoload
(defun delete-rectangle (start end &optional fill)
  "Delete (don't save) text in the region-rectangle.
The same range of columns is deleted in each line starting with the
line where the region begins and ending with the line where the region
ends.

When called from a program the rectangle's corners are START and END.
With a prefix (or a FILL) argument, also fill lines where nothing has
to be deleted."
  (interactive "*r\nP")
  (let (indent-tabs-mode)
    (apply-on-rectangle 'delete-rectangle-line start end fill)))