summaryrefslogtreecommitdiff
path: root/src/buffer.c
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2012-10-17 08:58:15 +0400
committerDmitry Antipov <dmantipov@yandex.ru>2012-10-17 08:58:15 +0400
commitf0863a54681cfe7d40a0844bd2ce812eed408002 (patch)
tree5f6db03327a067c8d3348518a33c793430d3afc7 /src/buffer.c
parentab1dc14b220747e527d507d40905a24ba5c692d9 (diff)
downloademacs-f0863a54681cfe7d40a0844bd2ce812eed408002.tar.gz
Do not verify indirection counters of killed buffers (Bug#12579).
* buffer.h (BUFFER_CHECK_INDIRECTION): New macro. * buffer.c (compact_buffer, set_buffer_internal_1): Use it.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 861a89b5a0f..8e77db66d43 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1663,18 +1663,11 @@ No argument or nil as argument means do this for the current buffer. */)
void
compact_buffer (struct buffer *buffer)
{
- /* Verify indirection counters. */
- if (buffer->base_buffer)
- {
- eassert (buffer->indirections == -1);
- eassert (buffer->base_buffer->indirections > 0);
- }
- else
- eassert (buffer->indirections >= 0);
+ BUFFER_CHECK_INDIRECTION (buffer);
/* Skip dead buffers, indirect buffers and buffers
which aren't changed since last compaction. */
- if (!NILP (buffer->INTERNAL_FIELD (name))
+ if (BUFFER_LIVE_P (buffer)
&& (buffer->base_buffer == NULL)
&& (buffer->text->compact != buffer->text->modiff))
{
@@ -2114,6 +2107,8 @@ set_buffer_internal_1 (register struct buffer *b)
if (current_buffer == b)
return;
+ BUFFER_CHECK_INDIRECTION (b);
+
old_buf = current_buffer;
current_buffer = b;
last_known_column_point = -1; /* invalidate indentation cache */