summaryrefslogtreecommitdiff
path: root/src/marker.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2002-04-13 17:47:20 +0000
committerRichard M. Stallman <rms@gnu.org>2002-04-13 17:47:20 +0000
commit59d360666731e862157766646d732b73f19295d2 (patch)
tree03d3d6771cfec77bcde6620568b1a4273f65741e /src/marker.c
parentadb63af12a7ad22e19b6d3ae45ddff768a5e86d1 (diff)
downloademacs-59d360666731e862157766646d732b73f19295d2.tar.gz
(count_markers): New function.
Diffstat (limited to 'src/marker.c')
-rw-r--r--src/marker.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/marker.c b/src/marker.c
index 9d24fb5ff8e..8b964142034 100644
--- a/src/marker.c
+++ b/src/marker.c
@@ -888,6 +888,23 @@ DEFUN ("buffer-has-markers-at", Fbuffer_has_markers_at, Sbuffer_has_markers_at,
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 ()