Mercurial > emacs
diff src/print.c @ 2782:683f4472f1c8
* lisp.h (Lisp_Overlay): New tag.
(OVERLAYP): New predicate.
(CHECK_OVERLAY): New type-checker.
(Qoverlayp): New extern declaration.
* buffer.c (Foverlayp): New function.
(Qoverlayp): New atom.
(overlays_at, recenter_overlay_lists): Abort if we encounter an
invalid overlay.
(syms_of_buffer): defsubr Soverlayp; initialize Qoverlayp.
(Fdelete_overlay): Set the overlay's markers to point nowhere.
Use CHECK_OVERLAY instead of signalling a special error.
(Fmove_overlay, Foverlay_put): Use CHECK_OVERLAY instead of
signalling a special error.
(Foverlay_get): Use CHECK_OVERLAY.
* fns.c (internal_equal): Define this for overlays.
* buffer.h (OVERLAY_VALID): Define in terms of OVERLAYP.
* print.c (print): Give overlays their own print syntax.
* alloc.c (mark_object): Treat overlays like conses.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Fri, 14 May 1993 14:43:00 +0000 |
parents | 652b38173a63 |
children | f5f76ebe6286 |
line wrap: on
line diff
--- a/src/print.c Fri May 14 14:42:01 1993 +0000 +++ b/src/print.c Fri May 14 14:43:00 1993 +0000 @@ -952,6 +952,23 @@ } PRINTCHAR ('>'); break; + + case Lisp_Overlay: + strout ("#<overlay ", -1, printcharfun); + if (!(XMARKER (OVERLAY_START (obj))->buffer)) + strout ("in no buffer", -1, printcharfun); + else + { + sprintf (buf, "from %d to %d in ", + marker_position (OVERLAY_START (obj)), + marker_position (OVERLAY_END (obj))); + strout (buf, -1, printcharfun); + print_string (XMARKER (OVERLAY_START (obj))->buffer->name, + printcharfun); + } + PRINTCHAR ('>'); + break; + #endif /* standalone */ case Lisp_Subr: