From: Richard M. Stallman Date: Sat, 13 Apr 2002 17:47:20 +0000 (+0000) Subject: (count_markers): New function. X-Git-Tag: ttn-vms-21-2-B4~15639 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=59d360666731e862157766646d732b73f19295d2;p=emacs.git (count_markers): New function. --- 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 ()