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 |
|
|
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 |
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); |
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); |
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 |
{ |
{ |
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. */ |
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. */ |
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; |