Mercurial > emacs
comparison src/marker.c @ 44560:0fddc27db9ae
(count_markers): New function.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 13 Apr 2002 17:47:20 +0000 |
parents | ed296e71aa64 |
children | 392bc50108e8 |
comparison
equal
deleted
inserted
replaced
44559:a7ca9a83f673 | 44560:0fddc27db9ae |
---|---|
886 if (XMARKER (tail)->charpos == charno) | 886 if (XMARKER (tail)->charpos == charno) |
887 return Qt; | 887 return Qt; |
888 | 888 |
889 return Qnil; | 889 return Qnil; |
890 } | 890 } |
891 | |
892 /* For debugging -- count the markers in buffer BUF. */ | |
893 | |
894 int | |
895 count_markers (buf) | |
896 struct buffer *buf; | |
897 { | |
898 int total = 0; | |
899 Lisp_Object tail; | |
900 | |
901 for (tail = BUF_MARKERS (buf); | |
902 !NILP (tail); | |
903 tail = XMARKER (tail)->chain) | |
904 total++; | |
905 | |
906 return total; | |
907 } | |
891 | 908 |
892 void | 909 void |
893 syms_of_marker () | 910 syms_of_marker () |
894 { | 911 { |
895 defsubr (&Smarker_position); | 912 defsubr (&Smarker_position); |