diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
| commit | 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch) | |
| tree | f1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/elisp/moving-markers.html | |
new repository
Diffstat (limited to 'devdocs/elisp/moving-markers.html')
| -rw-r--r-- | devdocs/elisp/moving-markers.html | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/devdocs/elisp/moving-markers.html b/devdocs/elisp/moving-markers.html new file mode 100644 index 00000000..f6041624 --- /dev/null +++ b/devdocs/elisp/moving-markers.html @@ -0,0 +1,23 @@ + <h3 class="section">Moving Marker Positions</h3> <p>This section describes how to change the position of an existing marker. When you do this, be sure you know whether the marker is used outside of your program, and, if so, what effects will result from moving it—otherwise, confusing things may happen in other parts of Emacs. </p> <dl> <dt id="set-marker">Function: <strong>set-marker</strong> <em>marker position &optional buffer</em> +</dt> <dd> +<p>This function moves <var>marker</var> to <var>position</var> in <var>buffer</var>. If <var>buffer</var> is not provided, it defaults to the current buffer. </p> <p>If <var>position</var> is <code>nil</code> or a marker that points nowhere, then <var>marker</var> is set to point nowhere. </p> <p>The value returned is <var>marker</var>. </p> <div class="example"> <pre class="example">(setq m (point-marker)) + ⇒ #<marker at 4714 in markers.texi> +</pre> +<pre class="example">(set-marker m 55) + ⇒ #<marker at 55 in markers.texi> +</pre> +<pre class="example">(setq b (get-buffer "foo")) + ⇒ #<buffer foo> +</pre> +<pre class="example">(set-marker m 0 b) + ⇒ #<marker at 1 in foo> +</pre> +</div> </dd> +</dl> <dl> <dt id="move-marker">Function: <strong>move-marker</strong> <em>marker position &optional buffer</em> +</dt> <dd><p>This is another name for <code>set-marker</code>. </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/Moving-Markers.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Moving-Markers.html</a> + </p> +</div> |
