summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/rect.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/rect.el b/lisp/rect.el
index 4e412befa46..97fa980d1a6 100644
--- a/lisp/rect.el
+++ b/lisp/rect.el
@@ -343,6 +343,12 @@ This command does not delete or overwrite any existing text."
(insert string))
;;;###autoload
+(defun replace-rectangle (start end string)
+ "Like `string-rectangle', but replace the original region."
+ (interactive "*r\nsString rectangle: ")
+ (apply-on-rectangle 'string-rectangle-line start end string t))
+
+;;;###autoload
(defun clear-rectangle (start end &optional fill)
"Blank out the region-rectangle.
The text previously in the region is overwritten with blanks.