blob: 792cc385e4c10764845be1d6a015c3cc44e7baf0 (
plain)
1
2
3
4
5
6
7
8
9
10
|
<h3 class="section">Transposition of Text</h3> <p>This function can be used to transpose stretches of text: </p> <dl> <dt id="transpose-regions">Function: <strong>transpose-regions</strong> <em>start1 end1 start2 end2 &optional leave-markers</em>
</dt> <dd>
<p>This function exchanges two nonoverlapping portions of the buffer (if they overlap, the function signals an error). Arguments <var>start1</var> and <var>end1</var> specify the bounds of one portion and arguments <var>start2</var> and <var>end2</var> specify the bounds of the other portion. </p> <p>Normally, <code>transpose-regions</code> relocates markers with the transposed text; a marker previously positioned within one of the two transposed portions moves along with that portion, thus remaining between the same two characters in their new position. However, if <var>leave-markers</var> is non-<code>nil</code>, <code>transpose-regions</code> does not do this—it leaves all markers unrelocated. </p>
</dd>
</dl><div class="_attribution">
<p class="_attribution-p">
Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
<a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Transposition.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Transposition.html</a>
</p>
</div>
|