changeset 10315:c78d0bb85d30

Use BUF_MARKERS throughout.
author Richard M. Stallman <rms@gnu.org>
date Mon, 02 Jan 1995 21:54:50 +0000
parents b5260fe3dfdd
children 272f15eddaca
files src/marker.c
diffstat 1 files changed, 13 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/marker.c	Mon Jan 02 21:50:28 1995 +0000
+++ b/src/marker.c	Mon Jan 02 21:54:50 1995 +0000
@@ -122,9 +122,9 @@
   if (m->buffer != b)
     {
       unchain_marker (marker);
-      m->chain = b->markers;
-      b->markers = marker;
       m->buffer = b;
+      m->chain = BUF_MARKERS (b);
+      BUF_MARKERS (b) = marker;
     }
   
   return marker;
@@ -180,9 +180,9 @@
   if (m->buffer != b)
     {
       unchain_marker (marker);
-      m->chain = b->markers;
-      b->markers = marker;
       m->buffer = b;
+      m->chain = BUF_MARKERS (b);
+      BUF_MARKERS (b) = marker;
     }
   
   return marker;
@@ -206,7 +206,7 @@
   if (EQ (b->name, Qnil))
     abort ();
 
-  tail = b->markers;
+  tail = BUF_MARKERS (b);
   prev = Qnil;
   while (XSYMBOL (tail) != XSYMBOL (Qnil))
     {
@@ -217,11 +217,11 @@
 	{
 	  if (NILP (prev))
 	    {
-	      b->markers = next;
-	      /* Deleting first marker from the buffer's chain.
-		 Crash if new first marker in chain does not say
-		 it belongs to this buffer.  */
-	      if (!EQ (next, Qnil) && b != XMARKER (next)->buffer)
+	      BUF_MARKERS (b) = next;
+	      /* Deleting first marker from the buffer's chain.  Crash
+		 if new first marker in chain does not say it belongs
+		 to the same buffer (or one of its indirect buffers).  */
+	      if (!NILP (next) && b != XMARKER (next)->buffer)
 		abort ();
 	    }
 	  else
@@ -239,6 +239,9 @@
   XMARKER (marker)->buffer = 0;
 }
 
+/* Return the buffer position of marker MARKER, as a C integer.  */
+
+int
 marker_position (marker)
      Lisp_Object marker;
 {