Changeset 3669

Show
Ignore:
Timestamp:
04/07/05 08:23:24 (4 years ago)
Author:
miyoshi
Message:

* buffer.h (struct buffer): Sync up with Emacs CVS HEAD.

* alloc.c (Fgarbage_collect): Ditto. `undo_list' related codes are
merged.
(mark_buffer): Ditto.
(pdump_add_special_buffers): Use `undo_list' to get offset instead
of `name'.
(pdump_write_special_buffers): Ditto.
(pdump_load): Ditto.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.2/src/ChangeLog.Meadow

    r3668 r3669  
     12005-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 
    1132005-04-06  MIYOSHI Masanori  <miyoshi@meadowy.org> 
    214 
  • branches/2.2/src/alloc.c

    r3668 r3669  
    49004900              } 
    49014901          } 
     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); 
    49024905 
    49034906        nextb = nextb->next; 
     
    55445547 
    55455548  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           else 
    5567             mark_object (ptr->car); 
    5568  
    5569           if (CONSP (ptr->cdr)) 
    5570             tail = ptr->cdr; 
    5571           else 
    5572             break; 
    5573         } 
    5574  
    5575       mark_object (XCDR (tail)); 
    5576     } 
    5577   else 
    5578     mark_object (buffer->undo_list); 
    55795549 
    55805550  /* For now, we just don't mark the undo_list.  It's done later in 
     
    71047074  for (i = 0; buffers[i]; i++) 
    71057075    { 
    7106       for (offset = (char *)&buffers[i]->undo_list - (char *)buffers[i]; 
     7076      for (offset = (char *)&buffers[i]->name - (char *)buffers[i]; 
    71077077           offset < sizeof (struct buffer); 
    71087078           offset += (sizeof (Lisp_Object))) 
     
    71257095    int size =  sizeof (struct buffer) 
    71267096      + (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); 
    71297099  } 
    71307100 
    71317101  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]; 
    71337103         offset < sizeof (struct buffer); 
    71347104         offset += (sizeof (Lisp_Object))) 
     
    77617731  /* load misc */ 
    77627732  { 
    7763     read (fd, &buffer_local_flags.undo_list
     7733    read (fd, &buffer_local_flags.name
    77647734          (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
    77677737          (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
    77707740          (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
    77737743          (sizeof (struct buffer) + (char *)&buffer_local_types 
    7774            - (char *)&buffer_local_types.undo_list)); 
     7744           - (char *)&buffer_local_types.name)); 
    77757745    if (offset != 0) 
    77767746      { 
     
    77817751                                    NULL}; 
    77827752        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]; 
    77847754               buff_offset < sizeof (struct buffer); 
    77857755               buff_offset += (sizeof (Lisp_Object))) 
  • branches/2.2/src/buffer.h

    r3661 r3669  
    532532  unsigned prevent_redisplay_optimizations_p : 1; 
    533533 
    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_text 
    538      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  
    543534  /* List of overlays that end at or before the current center, 
    544535     in order of end-position.  */ 
     
    591582  /* Mode line element that controls format of mode line.  */ 
    592583  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; 
    593593 
    594594  /* Analogous to mode_line_format for the line displayed at the top