diff options
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/alloc.c b/src/alloc.c index f75903aab5a..566c6fe00b9 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -3886,7 +3886,7 @@ live_buffer_p (struct mem_node *m, void *p) | |||
| 3886 | must not have been killed. */ | 3886 | must not have been killed. */ |
| 3887 | return (m->type == MEM_TYPE_BUFFER | 3887 | return (m->type == MEM_TYPE_BUFFER |
| 3888 | && p == m->start | 3888 | && p == m->start |
| 3889 | && !NILP (((struct buffer *) p)->name)); | 3889 | && !NILP (((struct buffer *) p)->BUFFER_INTERNAL_FIELD (name))); |
| 3890 | } | 3890 | } |
| 3891 | 3891 | ||
| 3892 | #endif /* GC_MARK_STACK || defined GC_MALLOC_CHECK */ | 3892 | #endif /* GC_MARK_STACK || defined GC_MALLOC_CHECK */ |
| @@ -4872,11 +4872,11 @@ returns nil, because real GC can't be done. */) | |||
| 4872 | turned off in that buffer. Calling truncate_undo_list on | 4872 | turned off in that buffer. Calling truncate_undo_list on |
| 4873 | Qt tends to return NULL, which effectively turns undo back on. | 4873 | Qt tends to return NULL, which effectively turns undo back on. |
| 4874 | So don't call truncate_undo_list if undo_list is Qt. */ | 4874 | So don't call truncate_undo_list if undo_list is Qt. */ |
| 4875 | if (! NILP (nextb->name) && ! EQ (nextb->undo_list, Qt)) | 4875 | if (! NILP (nextb->BUFFER_INTERNAL_FIELD (name)) && ! EQ (nextb->BUFFER_INTERNAL_FIELD (undo_list), Qt)) |
| 4876 | truncate_undo_list (nextb); | 4876 | truncate_undo_list (nextb); |
| 4877 | 4877 | ||
| 4878 | /* Shrink buffer gaps, but skip indirect and dead buffers. */ | 4878 | /* Shrink buffer gaps, but skip indirect and dead buffers. */ |
| 4879 | if (nextb->base_buffer == 0 && !NILP (nextb->name) | 4879 | if (nextb->base_buffer == 0 && !NILP (nextb->BUFFER_INTERNAL_FIELD (name)) |
| 4880 | && ! nextb->text->inhibit_shrinking) | 4880 | && ! nextb->text->inhibit_shrinking) |
| 4881 | { | 4881 | { |
| 4882 | /* If a buffer's gap size is more than 10% of the buffer | 4882 | /* If a buffer's gap size is more than 10% of the buffer |
| @@ -5009,10 +5009,10 @@ returns nil, because real GC can't be done. */) | |||
| 5009 | turned off in that buffer. Calling truncate_undo_list on | 5009 | turned off in that buffer. Calling truncate_undo_list on |
| 5010 | Qt tends to return NULL, which effectively turns undo back on. | 5010 | Qt tends to return NULL, which effectively turns undo back on. |
| 5011 | So don't call truncate_undo_list if undo_list is Qt. */ | 5011 | So don't call truncate_undo_list if undo_list is Qt. */ |
| 5012 | if (! EQ (nextb->undo_list, Qt)) | 5012 | if (! EQ (nextb->BUFFER_INTERNAL_FIELD (undo_list), Qt)) |
| 5013 | { | 5013 | { |
| 5014 | Lisp_Object tail, prev; | 5014 | Lisp_Object tail, prev; |
| 5015 | tail = nextb->undo_list; | 5015 | tail = nextb->BUFFER_INTERNAL_FIELD (undo_list); |
| 5016 | prev = Qnil; | 5016 | prev = Qnil; |
| 5017 | while (CONSP (tail)) | 5017 | while (CONSP (tail)) |
| 5018 | { | 5018 | { |
| @@ -5021,7 +5021,7 @@ returns nil, because real GC can't be done. */) | |||
| 5021 | && !XMARKER (XCAR (XCAR (tail)))->gcmarkbit) | 5021 | && !XMARKER (XCAR (XCAR (tail)))->gcmarkbit) |
| 5022 | { | 5022 | { |
| 5023 | if (NILP (prev)) | 5023 | if (NILP (prev)) |
| 5024 | nextb->undo_list = tail = XCDR (tail); | 5024 | nextb->BUFFER_INTERNAL_FIELD (undo_list) = tail = XCDR (tail); |
| 5025 | else | 5025 | else |
| 5026 | { | 5026 | { |
| 5027 | tail = XCDR (tail); | 5027 | tail = XCDR (tail); |
| @@ -5037,7 +5037,7 @@ returns nil, because real GC can't be done. */) | |||
| 5037 | } | 5037 | } |
| 5038 | /* Now that we have stripped the elements that need not be in the | 5038 | /* Now that we have stripped the elements that need not be in the |
| 5039 | undo_list any more, we can finally mark the list. */ | 5039 | undo_list any more, we can finally mark the list. */ |
| 5040 | mark_object (nextb->undo_list); | 5040 | mark_object (nextb->BUFFER_INTERNAL_FIELD (undo_list)); |
| 5041 | 5041 | ||
| 5042 | nextb = nextb->next; | 5042 | nextb = nextb->next; |
| 5043 | } | 5043 | } |
| @@ -5595,7 +5595,7 @@ mark_buffer (Lisp_Object buf) | |||
| 5595 | 5595 | ||
| 5596 | /* buffer-local Lisp variables start at `undo_list', | 5596 | /* buffer-local Lisp variables start at `undo_list', |
| 5597 | tho only the ones from `name' on are GC'd normally. */ | 5597 | tho only the ones from `name' on are GC'd normally. */ |
| 5598 | for (ptr = &buffer->name; | 5598 | for (ptr = &buffer->BUFFER_INTERNAL_FIELD (name); |
| 5599 | (char *)ptr < (char *)buffer + sizeof (struct buffer); | 5599 | (char *)ptr < (char *)buffer + sizeof (struct buffer); |
| 5600 | ptr++) | 5600 | ptr++) |
| 5601 | mark_object (*ptr); | 5601 | mark_object (*ptr); |