[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/minibuf.c
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/src/minibuf.c |
Date: |
Tue, 22 Jul 2003 12:12:46 -0400 |
Index: emacs/src/minibuf.c
diff -c emacs/src/minibuf.c:1.259 emacs/src/minibuf.c:1.260
*** emacs/src/minibuf.c:1.259 Sun Jul 6 19:26:09 2003
--- emacs/src/minibuf.c Tue Jul 22 12:12:45 2003
***************
*** 777,784 ****
else
{
int count = SPECPDL_INDEX ();
! reset_buffer (XBUFFER (buf));
record_unwind_protect (Fset_buffer, Fcurrent_buffer ());
Fset_buffer (buf);
Fkill_all_local_variables ();
--- 777,803 ----
else
{
int count = SPECPDL_INDEX ();
+ Lisp_Object overlay;
+ struct buffer *b = XBUFFER (buf);
! /* `reset_buffer' blindly sets the list of overlays to NULL, so we
! have to empty the list, otherwise we end up with overlays that
! think they belong to this buffer while the buffer doesn't know about
! them any more. */
! while (b->overlays_before)
! {
! XSETMISC (overlay, b->overlays_before);
! Fdelete_overlay (overlay);
! }
! while (b->overlays_after)
! {
! XSETMISC (overlay, b->overlays_after);
! Fdelete_overlay (overlay);
! }
! eassert (b->overlays_before == NULL);
! eassert (b->overlays_after == NULL);
!
! reset_buffer (b);
record_unwind_protect (Fset_buffer, Fcurrent_buffer ());
Fset_buffer (buf);
Fkill_all_local_variables ();