From 59d360666731e862157766646d732b73f19295d2 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 13 Apr 2002 17:47:20 +0000 Subject: [PATCH] (count_markers): New function. --- src/marker.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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 () -- 2.39.5