comparison 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
comparison
equal deleted inserted replaced
2781:fde05936aebb 2782:683f4472f1c8
950 strout (" in ", -1, printcharfun); 950 strout (" in ", -1, printcharfun);
951 print_string (XMARKER (obj)->buffer->name, printcharfun); 951 print_string (XMARKER (obj)->buffer->name, printcharfun);
952 } 952 }
953 PRINTCHAR ('>'); 953 PRINTCHAR ('>');
954 break; 954 break;
955
956 case Lisp_Overlay:
957 strout ("#<overlay ", -1, printcharfun);
958 if (!(XMARKER (OVERLAY_START (obj))->buffer))
959 strout ("in no buffer", -1, printcharfun);
960 else
961 {
962 sprintf (buf, "from %d to %d in ",
963 marker_position (OVERLAY_START (obj)),
964 marker_position (OVERLAY_END (obj)));
965 strout (buf, -1, printcharfun);
966 print_string (XMARKER (OVERLAY_START (obj))->buffer->name,
967 printcharfun);
968 }
969 PRINTCHAR ('>');
970 break;
971
955 #endif /* standalone */ 972 #endif /* standalone */
956 973
957 case Lisp_Subr: 974 case Lisp_Subr:
958 strout ("#<subr ", -1, printcharfun); 975 strout ("#<subr ", -1, printcharfun);
959 strout (XSUBR (obj)->symbol_name, -1, printcharfun); 976 strout (XSUBR (obj)->symbol_name, -1, printcharfun);