diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2012-07-06 08:42:30 +0400 |
---|---|---|
committer | Dmitry Antipov <dmantipov@yandex.ru> | 2012-07-06 08:42:30 +0400 |
commit | 041a49a645d9bbe7f249083d9065076bc8ccaa45 (patch) | |
tree | b775009c6f32c55e8504f07971a4920d87de8a45 /src/minibuf.c | |
parent | 226c3633fdc0a259aa73aa9e6555cd42dd9f168c (diff) | |
download | emacs-041a49a645d9bbe7f249083d9065076bc8ccaa45.tar.gz |
Do not use Fdelete_overlay in delete_all_overlays
to avoid redundant calls to unchain_overlay.
* buffer.c (drop_overlay): New function.
(delete_all_overlays, Fdelete_overlay): Use it.
* minibuf.c (get_minibuffer): Fix comment.
Diffstat (limited to 'src/minibuf.c')
-rw-r--r-- | src/minibuf.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/minibuf.c b/src/minibuf.c index 050a22a418d..89390aeb0b5 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -804,10 +804,9 @@ get_minibuffer (EMACS_INT depth) else { ptrdiff_t count = SPECPDL_INDEX (); - /* `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. */ + /* We have to empty both overlay lists. Otherwise we end + up with overlays that think they belong to this buffer + while the buffer doesn't know about them any more. */ delete_all_overlays (XBUFFER (buf)); reset_buffer (XBUFFER (buf)); record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); |