630 |
return buf; |
return buf; |
631 |
} |
} |
632 |
|
|
633 |
|
void |
634 |
|
delete_all_overlays (b) |
635 |
|
struct buffer *b; |
636 |
|
{ |
637 |
|
Lisp_Object overlay; |
638 |
|
|
639 |
|
/* `reset_buffer' blindly sets the list of overlays to NULL, so we |
640 |
|
have to empty the list, otherwise we end up with overlays that |
641 |
|
think they belong to this buffer while the buffer doesn't know about |
642 |
|
them any more. */ |
643 |
|
while (b->overlays_before) |
644 |
|
{ |
645 |
|
XSETMISC (overlay, b->overlays_before); |
646 |
|
Fdelete_overlay (overlay); |
647 |
|
} |
648 |
|
while (b->overlays_after) |
649 |
|
{ |
650 |
|
XSETMISC (overlay, b->overlays_after); |
651 |
|
Fdelete_overlay (overlay); |
652 |
|
} |
653 |
|
eassert (b->overlays_before == NULL); |
654 |
|
eassert (b->overlays_after == NULL); |
655 |
|
} |
656 |
|
|
657 |
/* Reinitialize everything about a buffer except its name and contents |
/* Reinitialize everything about a buffer except its name and contents |
658 |
and local variables. */ |
and local variables. |
659 |
|
If called on an already-initialized buffer, the list of overlays |
660 |
|
should be deleted before calling this function, otherwise we end up |
661 |
|
with overlays that claim to belong to the buffer but the buffer |
662 |
|
claims it doesn't belong to it. */ |
663 |
|
|
664 |
void |
void |
665 |
reset_buffer (b) |
reset_buffer (b) |