From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/elisp/moving-markers.html | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 devdocs/elisp/moving-markers.html (limited to 'devdocs/elisp/moving-markers.html') 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 @@ +

Moving Marker Positions

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.

Function: set-marker marker position &optional buffer +
+

This function moves marker to position in buffer. If buffer is not provided, it defaults to the current buffer.

If position is nil or a marker that points nowhere, then marker is set to point nowhere.

The value returned is marker.

(setq m (point-marker))
+     ⇒ #<marker at 4714 in markers.texi>
+
+
(set-marker m 55)
+     ⇒ #<marker at 55 in markers.texi>
+
+
(setq b (get-buffer "foo"))
+     ⇒ #<buffer foo>
+
+
(set-marker m 0 b)
+     ⇒ #<marker at 1 in foo>
+
+
+
Function: move-marker marker position &optional buffer +

This is another name for set-marker.

+
+

+ Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc.
Licensed under the GNU GPL license.
+ https://www.gnu.org/software/emacs/manual/html_node/elisp/Moving-Markers.html +

+
-- cgit v1.2.3