diff options
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/buffer.c b/src/buffer.c index 68208d17abe..734ddb5a1c1 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -433,12 +433,8 @@ copy_overlays (struct buffer *b, struct Lisp_Overlay *list) | |||
| 433 | XMARKER (end)->insertion_type | 433 | XMARKER (end)->insertion_type |
| 434 | = XMARKER (OVERLAY_END (old_overlay))->insertion_type; | 434 | = XMARKER (OVERLAY_END (old_overlay))->insertion_type; |
| 435 | 435 | ||
| 436 | overlay = allocate_misc (); | 436 | overlay = build_overlay |
| 437 | XMISCTYPE (overlay) = Lisp_Misc_Overlay; | 437 | (start, end, Fcopy_sequence (OVERLAY_PLIST (old_overlay))); |
| 438 | OVERLAY_START (overlay) = start; | ||
| 439 | OVERLAY_END (overlay) = end; | ||
| 440 | OVERLAY_PLIST (overlay) = Fcopy_sequence (OVERLAY_PLIST (old_overlay)); | ||
| 441 | XOVERLAY (overlay)->next = NULL; | ||
| 442 | 438 | ||
| 443 | if (tail) | 439 | if (tail) |
| 444 | tail = tail->next = XOVERLAY (overlay); | 440 | tail = tail->next = XOVERLAY (overlay); |
| @@ -3640,12 +3636,7 @@ for the rear of the overlay advance when text is inserted there | |||
| 3640 | if (!NILP (rear_advance)) | 3636 | if (!NILP (rear_advance)) |
| 3641 | XMARKER (end)->insertion_type = 1; | 3637 | XMARKER (end)->insertion_type = 1; |
| 3642 | 3638 | ||
| 3643 | overlay = allocate_misc (); | 3639 | overlay = build_overlay (beg, end, Qnil); |
| 3644 | XMISCTYPE (overlay) = Lisp_Misc_Overlay; | ||
| 3645 | XOVERLAY (overlay)->start = beg; | ||
| 3646 | XOVERLAY (overlay)->end = end; | ||
| 3647 | XOVERLAY (overlay)->plist = Qnil; | ||
| 3648 | XOVERLAY (overlay)->next = NULL; | ||
| 3649 | 3640 | ||
| 3650 | /* Put the new overlay on the wrong list. */ | 3641 | /* Put the new overlay on the wrong list. */ |
| 3651 | end = OVERLAY_END (overlay); | 3642 | end = OVERLAY_END (overlay); |