summaryrefslogtreecommitdiff
path: root/src/print.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@redhat.com>1993-05-14 14:43:00 +0000
committerJim Blandy <jimb@redhat.com>1993-05-14 14:43:00 +0000
commitb71a12ded856414d264acf9a27a36ba173b9a2b2 (patch)
tree7647e48fc3ad8e61a72918cd2479f7303cf1d776 /src/print.c
parentefa6962c19ae6fb83ee591b7118fb7762921087d (diff)
downloademacs-b71a12ded856414d264acf9a27a36ba173b9a2b2.tar.gz
* 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.
Diffstat (limited to 'src/print.c')
-rw-r--r--src/print.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/print.c b/src/print.c
index ba41e46454e..23901175de1 100644
--- a/src/print.c
+++ b/src/print.c
@@ -952,6 +952,23 @@ print (obj, printcharfun, escapeflag)
}
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: