/[emacs]/emacs/src/undo.c
ViewVC logotype

Diff of /emacs/src/undo.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.55 by monnier, Thu Apr 4 20:42:56 2002 UTC revision 1.55.2.1 by miles, Fri Apr 4 06:21:03 2003 UTC
# Line 43  Lisp_Object pending_boundary; Line 43  Lisp_Object pending_boundary;
43    
44  static void  static void
45  record_point (pt)  record_point (pt)
46         int pt;
47  {  {
48    int at_boundary;    int at_boundary;
49    
# Line 80  record_point (pt) Line 81  record_point (pt)
81    if (MODIFF <= SAVE_MODIFF)    if (MODIFF <= SAVE_MODIFF)
82      record_first_change ();      record_first_change ();
83    
84    /* If we are just after an undo boundary, and    /* If we are just after an undo boundary, and
85       point wasn't at start of deleted range, record where it was.  */       point wasn't at start of deleted range, record where it was.  */
86    if (at_boundary    if (at_boundary
87        && last_point_position != pt        && last_point_position != pt
# Line 142  record_delete (beg, string) Line 143  record_delete (beg, string)
143    if (EQ (current_buffer->undo_list, Qt))    if (EQ (current_buffer->undo_list, Qt))
144      return;      return;
145    
146    if (PT == beg + XSTRING (string)->size)    if (PT == beg + SCHARS (string))
147      {      {
148        XSETINT (sbeg, -beg);        XSETINT (sbeg, -beg);
149        record_point (PT);        record_point (PT);
# Line 174  record_marker_adjustment (marker, adjust Line 175  record_marker_adjustment (marker, adjust
175    if (NILP (pending_boundary))    if (NILP (pending_boundary))
176      pending_boundary = Fcons (Qnil, Qnil);      pending_boundary = Fcons (Qnil, Qnil);
177    
178    if (!BUFFERP (last_undo_buffer)    if (!BUFFERP (last_undo_buffer)
179        || current_buffer != XBUFFER (last_undo_buffer))        || current_buffer != XBUFFER (last_undo_buffer))
180      Fundo_boundary ();      Fundo_boundary ();
181    XSETBUFFER (last_undo_buffer, current_buffer);    XSETBUFFER (last_undo_buffer, current_buffer);
# Line 311  truncate_undo_list (list, minsize, maxsi Line 312  truncate_undo_list (list, minsize, maxsi
312       If the first element is an undo boundary, skip past it.       If the first element is an undo boundary, skip past it.
313    
314       Skip, skip, skip the undo, skip, skip, skip the undo,       Skip, skip, skip the undo, skip, skip, skip the undo,
315       Skip, skip, skip the undo, skip to the undo bound'ry.       Skip, skip, skip the undo, skip to the undo bound'ry.
316       (Get it?  "Skip to my Loo?")  */       (Get it?  "Skip to my Loo?")  */
317    if (CONSP (next) && NILP (XCAR (next)))    if (CONSP (next) && NILP (XCAR (next)))
318      {      {
# Line 334  truncate_undo_list (list, minsize, maxsi Line 335  truncate_undo_list (list, minsize, maxsi
335            size_so_far += sizeof (struct Lisp_Cons);            size_so_far += sizeof (struct Lisp_Cons);
336            if (STRINGP (XCAR (elt)))            if (STRINGP (XCAR (elt)))
337              size_so_far += (sizeof (struct Lisp_String) - 1              size_so_far += (sizeof (struct Lisp_String) - 1
338                              + XSTRING (XCAR (elt))->size);                              + SCHARS (XCAR (elt)));
339          }          }
340    
341        /* Advance to next element.  */        /* Advance to next element.  */
# Line 369  truncate_undo_list (list, minsize, maxsi Line 370  truncate_undo_list (list, minsize, maxsi
370            size_so_far += sizeof (struct Lisp_Cons);            size_so_far += sizeof (struct Lisp_Cons);
371            if (STRINGP (XCAR (elt)))            if (STRINGP (XCAR (elt)))
372              size_so_far += (sizeof (struct Lisp_String) - 1              size_so_far += (sizeof (struct Lisp_String) - 1
373                              + XSTRING (XCAR (elt))->size);                              + SCHARS (XCAR (elt)));
374          }          }
375    
376        /* Advance to next element.  */        /* Advance to next element.  */
# Line 399  Return what remains of the list.  */) Line 400  Return what remains of the list.  */)
400  {  {
401    struct gcpro gcpro1, gcpro2;    struct gcpro gcpro1, gcpro2;
402    Lisp_Object next;    Lisp_Object next;
403    int count = BINDING_STACK_SIZE ();    int count = SPECPDL_INDEX ();
404    register int arg;    register int arg;
405      
406  #if 0  /* This is a good feature, but would make undo-start  #if 0  /* This is a good feature, but would make undo-start
407            unable to do what is expected.  */            unable to do what is expected.  */
408    Lisp_Object tem;    Lisp_Object tem;

Legend:
Removed from v.1.55  
changed lines
  Added in v.1.55.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26