Mercurial > emacs
changeset 22205:8576d32229fc
(close-rectangle): New command.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 24 May 1998 00:52:38 +0000 |
parents | e1921cd8a532 |
children | ebcc36b6b95e |
files | lisp/rect.el |
diffstat | 1 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/rect.el Sat May 23 20:20:48 1998 +0000 +++ b/lisp/rect.el Sun May 24 00:52:38 1998 +0000 @@ -202,6 +202,23 @@ (indent-to (+ endcol whitewidth)))) ;;;###autoload +(defun close-rectangle (start end) + "Delete all whitespace following a specified column in each line. +The left edge of the rectangle specifies the position in each line +at which whitespace deletion should begin. On each line in the +rectangle, all continuous whitespace starting at that column is deleted." + (interactive "r") + (operate-on-rectangle '(lambda (startpos begextra endextra) + (save-excursion + (goto-char startpos) + (delete-region (point) + (progn + (skip-syntax-forward " ") + (point))))) + start end t)) + + +;;;###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.