Changeset 3669
- Timestamp:
- 04/07/05 08:23:24 (4 years ago)
- Files:
-
- branches/2.2/src/ChangeLog.Meadow (modified) (1 diff)
- branches/2.2/src/alloc.c (modified) (6 diffs)
- branches/2.2/src/buffer.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/2.2/src/ChangeLog.Meadow
r3668 r3669 1 2005-04-07 MIYOSHI Masanori <miyoshi@meadowy.org> 2 3 * buffer.h (struct buffer): Sync up with Emacs CVS HEAD. 4 5 * alloc.c (Fgarbage_collect): Ditto. `undo_list' related codes are 6 merged. 7 (mark_buffer): Ditto. 8 (pdump_add_special_buffers): Use `undo_list' to get offset instead 9 of `name'. 10 (pdump_write_special_buffers): Ditto. 11 (pdump_load): Ditto. 12 1 13 2005-04-06 MIYOSHI Masanori <miyoshi@meadowy.org> 2 14 branches/2.2/src/alloc.c
r3668 r3669 4900 4900 } 4901 4901 } 4902 /* Now that we have stripped the elements that need not be in the 4903 undo_list any more, we can finally mark the list. */ 4904 mark_object (nextb->undo_list); 4902 4905 4903 4906 nextb = nextb->next; … … 5544 5547 5545 5548 MARK_INTERVAL_TREE (BUF_INTERVALS (buffer)); 5546 5547 if (CONSP (buffer->undo_list))5548 {5549 Lisp_Object tail;5550 tail = buffer->undo_list;5551 5552 while (CONSP (tail))5553 {5554 register struct Lisp_Cons *ptr = XCONS (tail);5555 5556 if (XMARKBIT (ptr->car))5557 break;5558 XMARK (ptr->car);5559 if (GC_CONSP (ptr->car)5560 && ! XMARKBIT (XCAR (ptr->car))5561 && GC_MARKERP (XCAR (ptr->car)))5562 {5563 XMARK (XCAR (ptr->car));5564 mark_object (XCDR (ptr->car));5565 }5566 else5567 mark_object (ptr->car);5568 5569 if (CONSP (ptr->cdr))5570 tail = ptr->cdr;5571 else5572 break;5573 }5574 5575 mark_object (XCDR (tail));5576 }5577 else5578 mark_object (buffer->undo_list);5579 5549 5580 5550 /* For now, we just don't mark the undo_list. It's done later in … … 7104 7074 for (i = 0; buffers[i]; i++) 7105 7075 { 7106 for (offset = (char *)&buffers[i]-> undo_list- (char *)buffers[i];7076 for (offset = (char *)&buffers[i]->name - (char *)buffers[i]; 7107 7077 offset < sizeof (struct buffer); 7108 7078 offset += (sizeof (Lisp_Object))) … … 7125 7095 int size = sizeof (struct buffer) 7126 7096 + (char *)&buffer_local_flags 7127 - (char *)&buffer_local_flags. undo_list;7128 fwrite (&buffer_local_flags. undo_list, size, 1, pdump_stream);7097 - (char *)&buffer_local_flags.name; 7098 fwrite (&buffer_local_flags.name, size, 1, pdump_stream); 7129 7099 } 7130 7100 7131 7101 for (i = 0; buffers[i]; i++) 7132 for (offset = (char *)&buffers[i]-> undo_list- (char *)buffers[i];7102 for (offset = (char *)&buffers[i]->name - (char *)buffers[i]; 7133 7103 offset < sizeof (struct buffer); 7134 7104 offset += (sizeof (Lisp_Object))) … … 7761 7731 /* load misc */ 7762 7732 { 7763 read (fd, &buffer_local_flags. undo_list,7733 read (fd, &buffer_local_flags.name, 7764 7734 (sizeof (struct buffer) + (char *)&buffer_local_flags 7765 - (char *)&buffer_local_flags. undo_list));7766 read (fd, &buffer_defaults. undo_list,7735 - (char *)&buffer_local_flags.name)); 7736 read (fd, &buffer_defaults.name, 7767 7737 (sizeof (struct buffer) + (char *)&buffer_defaults 7768 - (char *)&buffer_defaults. undo_list));7769 read (fd, &buffer_local_symbols. undo_list,7738 - (char *)&buffer_defaults.name)); 7739 read (fd, &buffer_local_symbols.name, 7770 7740 (sizeof (struct buffer) + (char *)&buffer_local_symbols 7771 - (char *)&buffer_local_symbols. undo_list));7772 read (fd, &buffer_local_types. undo_list,7741 - (char *)&buffer_local_symbols.name)); 7742 read (fd, &buffer_local_types.name, 7773 7743 (sizeof (struct buffer) + (char *)&buffer_local_types 7774 - (char *)&buffer_local_types. undo_list));7744 - (char *)&buffer_local_types.name)); 7775 7745 if (offset != 0) 7776 7746 { … … 7781 7751 NULL}; 7782 7752 for (i = 0; buffers[i]; i++) 7783 for (buff_offset = (char *)&buffers[i]-> undo_list- (char *)buffers[i];7753 for (buff_offset = (char *)&buffers[i]->name - (char *)buffers[i]; 7784 7754 buff_offset < sizeof (struct buffer); 7785 7755 buff_offset += (sizeof (Lisp_Object))) branches/2.2/src/buffer.h
r3661 r3669 532 532 unsigned prevent_redisplay_optimizations_p : 1; 533 533 534 /* Changes in the buffer are recorded here for undo.535 t means don't record anything.536 This information belongs to the base buffer of an indirect buffer,537 But we can't store it in the struct buffer_text538 because local variables have to be right in the struct buffer.539 So we copy it around in set_buffer_internal.540 This comes before `name' because it is marked in a special way. */541 Lisp_Object undo_list;542 543 534 /* List of overlays that end at or before the current center, 544 535 in order of end-position. */ … … 591 582 /* Mode line element that controls format of mode line. */ 592 583 Lisp_Object mode_line_format; 584 585 /* Changes in the buffer are recorded here for undo. 586 t means don't record anything. 587 This information belongs to the base buffer of an indirect buffer, 588 But we can't store it in the struct buffer_text 589 because local variables have to be right in the struct buffer. 590 So we copy it around in set_buffer_internal. 591 This comes before `name' because it is marked in a special way. */ 592 Lisp_Object undo_list; 593 593 594 594 /* Analogous to mode_line_format for the line displayed at the top
