# HG changeset patch # User Richard M. Stallman # Date 1018720040 0 # Node ID 0fddc27db9ae3897315a2bb6a4f2146f8c41c2f8 # Parent a7ca9a83f673109e8e17624b124365391e8394b1 (count_markers): New function. diff -r a7ca9a83f673 -r 0fddc27db9ae src/marker.c --- 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 ()