diff options
author | Jim Blandy <[email protected]> | 1993-05-14 14:41:36 +0000 |
---|---|---|
committer | Jim Blandy <[email protected]> | 1993-05-14 14:41:36 +0000 |
commit | 20280af7ca3a4c80cd80cd3fd168ce09e9a6b159 (patch) | |
tree | 4098626fcae79e1e9e5508d4483630b4a6ce08ac /src/lisp.h | |
parent | 620567645f9c58fcbaf3e39b10ad39d6994769af (diff) |
* 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.
* lisp.h (FLOATP): Define this appropriately when LISP_FLOAT_TYPE
is not defined.
Diffstat (limited to 'src/lisp.h')
-rw-r--r-- | src/lisp.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/lisp.h b/src/lisp.h index 7d69e76569..a13db81a77 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -153,12 +153,19 @@ enum Lisp_Type Lisp_Window, /* Used by save,set,restore-window-configuration */ - Lisp_Window_Configuration + Lisp_Window_Configuration, #ifdef LISP_FLOAT_TYPE - , - Lisp_Float + Lisp_Float, #endif /* LISP_FLOAT_TYPE */ + + /* The overlay type. + An overlay values is actually a retagged cons, the first in a + list of the form + ((START . END) nil . PLIST) + where START and END are markers in the overlay's buffer, and + PLIST is the overlay's property list. */ + Lisp_Overlay }; #ifndef NO_UNION_TYPE @@ -626,7 +633,12 @@ typedef unsigned char UCHAR; #define FRAMEP(x) (XTYPE ((x)) == Lisp_Frame) #define WINDOWP(x) (XTYPE ((x)) == Lisp_Window) #define WINDOW_CONFIGURATIONP(x) (XTYPE ((x)) == Lisp_Window_Configuration) +#ifdef LISP_FLOAT_TYPE #define FLOATP(x) (XTYPE ((x)) == Lisp_Float) +#else +#define FLOATP(x) (0) +#endif +#define OVERLAYP(x) (XTYPE ((x)) == Lisp_Overlay) #define EQ(x, y) (XFASTINT (x) == XFASTINT (y)) #define GC_EQ(x, y) (XGCTYPE (x) == XGCTYPE (y) && XPNTR (x) == XPNTR (y)) @@ -713,6 +725,9 @@ typedef unsigned char UCHAR; #define XFLOATINT(n) XINT((n)) #endif /* LISP_FLOAT_TYPE */ +#define CHECK_OVERLAY(x, i) \ + { if (XTYPE ((x)) != Lisp_Overlay) x = wrong_type_argument (Qoverlayp, (x));} + /* Cast pointers to this type to compare them. Some machines want int. */ #ifndef PNTR_COMPARISON_TYPE #define PNTR_COMPARISON_TYPE unsigned int @@ -1122,6 +1137,7 @@ extern Lisp_Object Fget_buffer (), Fget_buffer_create (), Fset_buffer (); extern Lisp_Object Fbarf_if_buffer_read_only (); extern Lisp_Object Fcurrent_buffer (), Fswitch_to_buffer (), Fpop_to_buffer (); extern Lisp_Object Fother_buffer (); +extern Lisp_Object Qoverlayp; extern struct buffer *all_buffers; /* defined in marker.c */ |