Commit 1e1e6d52 authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

Adapt to the change of string-rectangle back to 20.x behaviour.

parent 8748ecc0
...@@ -2157,11 +2157,11 @@ when you press the @key{TAB} character in certain modes. ...@@ -2157,11 +2157,11 @@ when you press the @key{TAB} character in certain modes.
To do this to an entire buffer, type @kbd{M-< M-x replace-regexp To do this to an entire buffer, type @kbd{M-< M-x replace-regexp
@key{RET} ^ @key{RET} > @key{RET}}. @key{RET} ^ @key{RET} > @key{RET}}.
To do this to a region, use @code{string-rectangle} (@kbd{C-x r t}). To do this to a region, use @code{string-insert-rectangle}.
Set the mark (@kbd{C-@key{SPC}}) at the beginning of the first line you Set the mark (@kbd{C-@key{SPC}}) at the beginning of the first line you
want to prefix, move the cursor to last line to be prefixed, and type want to prefix, move the cursor to last line to be prefixed, and type
@kbd{C-x r t > @key{RET}}. To do this for the whole buffer, type @kbd{M-x string-insert-rectangle @key{RET}}. To do this for the whole
@kbd{C-x h C-x r t > @key{RET}}. buffer, type @kbd{C-x h M-x string-insert-rectangle @key{RET}}.
If you are trying to prefix a yanked mail message with @samp{>}, you If you are trying to prefix a yanked mail message with @samp{>}, you
might want to set the variable @code{mail-yank-prefix}. Better yet, use might want to set the variable @code{mail-yank-prefix}. Better yet, use
......
...@@ -538,11 +538,13 @@ Clear the region-rectangle by replacing its contents with spaces. ...@@ -538,11 +538,13 @@ Clear the region-rectangle by replacing its contents with spaces.
Delete whitespace in each of the lines on the specified rectangle, Delete whitespace in each of the lines on the specified rectangle,
starting from the left edge column of the rectangle. starting from the left edge column of the rectangle.
@item C-x r t @var{string} @key{RET} @item C-x r t @var{string} @key{RET}
Insert @var{string} on each line of the region-rectangle Replace rectangle contents with @var{string} on each line.
(@code{string-rectangle}). (@code{string-rectangle}).
@item M-x replace-rectangle @key{RET} @var{string} @key{RET} @item M-x replace-rectangle @key{RET} @var{string} @key{RET}
Replaces each line of the region-rectangle with @var{string} Replaces each line of the region-rectangle with @var{string}
(@code{string-rectangle}). (@code{string-rectangle}).
@item M-x string-insert-rectangle @key{RET} @var{string} @key{RET}
Insert @var{STRING} on each line of the rectangle.
@end table @end table
The rectangle operations fall into two classes: commands deleting and The rectangle operations fall into two classes: commands deleting and
...@@ -603,13 +605,15 @@ any difference to this command. ...@@ -603,13 +605,15 @@ any difference to this command.
@kindex C-x r t @kindex C-x r t
@findex string-rectangle @findex string-rectangle
The command @kbd{C-x r t} (@code{M-x string-rectangle}) inserts a
string on each line of the region-rectangle before the rectangle,
shifting text right.
@findex replace-rectangle @findex replace-rectangle
The command @kbd{M-x replace-rectangle} is similar to @kbd{C-x r t}, The command @kbd{C-x r t} (@code{M-x string-rectangle}) replaces the
but replaces the original rectangle. The string's width need not be contents of a region-rectangle with a string on each line. The
the same as the width of the rectangle. If the string's width is string's width need not be the same as the width of the rectangle. If
less, the text after the rectangle shifts left; if the string is wider the string's width is less, the text after the rectangle shifts left;
than the rectangle, the text after the rectangle shifts right. if the string is wider than the rectangle, the text after the
rectangle shifts right.
@findex string-insert-rectangle
The command @kbd{M-x string-insert-rectangle} is similar to
@code{string-rectangle}, but inserts the string on each line,
shifting the original text to the right.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment