(string-rectangle): Renamed from fill-rectangle.
(string-rectangle-line): Renamed from fill-rectangle-line.
This commit is contained in:
parent
d5ec09ce2e
commit
ccb629e40b
1 changed files with 10 additions and 10 deletions
20
lisp/rect.el
20
lisp/rect.el
|
@ -192,17 +192,17 @@ but instead winds up to the right of the rectangle."
|
|||
(indent-to column)))
|
||||
|
||||
;;;###autoload
|
||||
(defun fill-rectangle (start end text)
|
||||
"Fill each line of the rectangle with corners at point and mark with
|
||||
text, shifting text right. The text previously in the region is not
|
||||
overwritten by the blanks, but instead winds up to the right of the
|
||||
rectangle. Called from a program, takes three args; START, END and
|
||||
TEXT."
|
||||
(interactive "r\nsText:")
|
||||
(operate-on-rectangle 'fill-rectangle-line start end nil)
|
||||
(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.
|
||||
|
||||
Called from a program, takes three args; START, END and STRING."
|
||||
(interactive "r\nsString rectangle: ")
|
||||
(operate-on-rectangle 'string-rectangle-line start end nil)
|
||||
(goto-char start))
|
||||
|
||||
(defun fill-rectangle-line (startpos begextra endextra)
|
||||
(defun string-rectangle-line (startpos begextra endextra)
|
||||
(let ((column (+ (current-column) begextra endextra)))
|
||||
(goto-char startpos)
|
||||
(let ((ocol (current-column)))
|
||||
|
@ -213,7 +213,7 @@ TEXT."
|
|||
;; characters before STARTPOS undisturbed.
|
||||
(progn (skip-chars-backward " \t" startpos)
|
||||
(point)))
|
||||
(insert text)))
|
||||
(insert string)))
|
||||
|
||||
;;;###autoload
|
||||
(defun clear-rectangle (start end)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue