diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/alloc.c | 1 | ||||
| -rw-r--r-- | src/buffer.h | 3 | ||||
| -rw-r--r-- | src/fns.c | 3 | ||||
| -rw-r--r-- | src/print.c | 17 |
4 files changed, 21 insertions, 3 deletions
diff --git a/src/alloc.c b/src/alloc.c index b0c120bad81..6aaa34dfc21 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -1609,6 +1609,7 @@ mark_object (objptr) | |||
| 1609 | case Lisp_Cons: | 1609 | case Lisp_Cons: |
| 1610 | case Lisp_Buffer_Local_Value: | 1610 | case Lisp_Buffer_Local_Value: |
| 1611 | case Lisp_Some_Buffer_Local_Value: | 1611 | case Lisp_Some_Buffer_Local_Value: |
| 1612 | case Lisp_Overlay: | ||
| 1612 | { | 1613 | { |
| 1613 | register struct Lisp_Cons *ptr = XCONS (obj); | 1614 | register struct Lisp_Cons *ptr = XCONS (obj); |
| 1614 | if (XMARKBIT (ptr->car)) break; | 1615 | if (XMARKBIT (ptr->car)) break; |
diff --git a/src/buffer.h b/src/buffer.h index 34d92fd61c7..3ab666c07bf 100644 --- a/src/buffer.h +++ b/src/buffer.h | |||
| @@ -370,7 +370,7 @@ extern Lisp_Object Vtransient_mark_mode; | |||
| 370 | Therefore, we cannot assume that they remain valid--we must check. */ | 370 | Therefore, we cannot assume that they remain valid--we must check. */ |
| 371 | 371 | ||
| 372 | /* 1 if the OV is a cons cell whose car is a cons cell. */ | 372 | /* 1 if the OV is a cons cell whose car is a cons cell. */ |
| 373 | #define OVERLAY_VALID(OV) (CONSP ((OV)) && CONSP (XCONS ((OV))->car)) | 373 | #define OVERLAY_VALID(OV) (OVERLAYP (OV)) |
| 374 | 374 | ||
| 375 | /* Return the marker that stands for where OV starts in the buffer. */ | 375 | /* Return the marker that stands for where OV starts in the buffer. */ |
| 376 | #define OVERLAY_START(OV) (XCONS (XCONS ((OV))->car)->car) | 376 | #define OVERLAY_START(OV) (XCONS (XCONS ((OV))->car)->car) |
| @@ -386,7 +386,6 @@ extern Lisp_Object Vtransient_mark_mode; | |||
| 386 | ((MARKERP ((P)) && XMARKER ((P))->buffer == current_buffer) \ | 386 | ((MARKERP ((P)) && XMARKER ((P))->buffer == current_buffer) \ |
| 387 | ? marker_position ((P)) : 0) | 387 | ? marker_position ((P)) : 0) |
| 388 | 388 | ||
| 389 | |||
| 390 | /* Allocation of buffer text. */ | 389 | /* Allocation of buffer text. */ |
| 391 | 390 | ||
| 392 | #ifdef REL_ALLOC | 391 | #ifdef REL_ALLOC |
| @@ -844,7 +844,8 @@ do_cdr: | |||
| 844 | } | 844 | } |
| 845 | #endif | 845 | #endif |
| 846 | if (XTYPE (o1) != XTYPE (o2)) return Qnil; | 846 | if (XTYPE (o1) != XTYPE (o2)) return Qnil; |
| 847 | if (XTYPE (o1) == Lisp_Cons) | 847 | if (XTYPE (o1) == Lisp_Cons |
| 848 | || XTYPE (o1) == Lisp_Overlay) | ||
| 848 | { | 849 | { |
| 849 | Lisp_Object v1; | 850 | Lisp_Object v1; |
| 850 | v1 = internal_equal (Fcar (o1), Fcar (o2), depth + 1); | 851 | v1 = internal_equal (Fcar (o1), Fcar (o2), depth + 1); |
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) | |||
| 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: |