aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1996-10-11 03:11:21 +0000
committerRichard M. Stallman1996-10-11 03:11:21 +0000
commit9e5896c6587462729863393af23bc023541c304c (patch)
tree8f9c9370b9eefd35233c95e0a1395b424c342485 /src
parentfd97770325a6485cbabb7d728904f3d33534c0b7 (diff)
downloademacs-9e5896c6587462729863393af23bc023541c304c.tar.gz
emacs-9e5896c6587462729863393af23bc023541c304c.zip
(Fbuffer_has_markers_at): New function.
(syms_of_marker): defsubr it.
Diffstat (limited to 'src')
-rw-r--r--src/marker.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/marker.c b/src/marker.c
index 856dc00ad10..a11068d69df 100644
--- a/src/marker.c
+++ b/src/marker.c
@@ -313,6 +313,32 @@ If TYPE is nil, it means the marker stays behind when you insert text at it.")
313 XMARKER (marker)->insertion_type = ! NILP (type); 313 XMARKER (marker)->insertion_type = ! NILP (type);
314 return type; 314 return type;
315} 315}
316
317DEFUN ("buffer-has-markers-at", Fbuffer_has_markers_at, Sbuffer_has_markers_at,
318 1, 1, 0,
319 "Return t if there are markers pointing at POSITION in the currentbuffer.")
320 (position)
321 Lisp_Object position;
322{
323 register Lisp_Object tail;
324 register int charno;
325
326 charno = XINT (position);
327
328 if (charno < BEG)
329 charno = BEG;
330 if (charno > Z)
331 charno = Z;
332 if (charno > GPT) charno += GAP_SIZE;
333
334 for (tail = BUF_MARKERS (current_buffer);
335 XSYMBOL (tail) != XSYMBOL (Qnil);
336 tail = XMARKER (tail)->chain)
337 if (XMARKER (tail)->bufpos == charno)
338 return Qt;
339
340 return Qnil;
341}
316 342
317syms_of_marker () 343syms_of_marker ()
318{ 344{
@@ -322,4 +348,5 @@ syms_of_marker ()
322 defsubr (&Scopy_marker); 348 defsubr (&Scopy_marker);
323 defsubr (&Smarker_insertion_type); 349 defsubr (&Smarker_insertion_type);
324 defsubr (&Sset_marker_insertion_type); 350 defsubr (&Sset_marker_insertion_type);
351 defsubr (&Sbuffer_has_markers_at);
325} 352}