Trailing whitespace deleted.
[bpt/emacs.git] / src / marker.c
index 9d24fb5..c59f9a9 100644 (file)
@@ -49,7 +49,7 @@ clear_charpos_cache (b)
 /* Converting between character positions and byte positions.  */
 
 /* There are several places in the buffer where we know
-   the corrspondence: BEG, BEGV, PT, GPT, ZV and Z,
+   the correspondence: BEG, BEGV, PT, GPT, ZV and Z,
    and everywhere there is a marker.  So we find the one of these places
    that is closest to the specified position, and scan from there.  */
 
@@ -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;
+}
 \f
 void
 syms_of_marker ()