diff src/marker.c @ 44560:0fddc27db9ae

(count_markers): New function.
author Richard M. Stallman <rms@gnu.org>
date Sat, 13 Apr 2002 17:47:20 +0000
parents ed296e71aa64
children 392bc50108e8
line wrap: on
line diff
--- a/src/marker.c	Sat Apr 13 17:46:37 2002 +0000
+++ b/src/marker.c	Sat Apr 13 17:47:20 2002 +0000
@@ -888,6 +888,23 @@
 
   return Qnil;
 }
+
+/* For debugging -- count the markers in buffer BUF.  */
+
+int
+count_markers (buf)
+     struct buffer *buf;
+{
+  int total = 0;
+  Lisp_Object tail;
+
+  for (tail = BUF_MARKERS (buf);
+       !NILP (tail);
+       tail = XMARKER (tail)->chain)
+    total++;
+
+  return total;
+}
 
 void
 syms_of_marker ()