X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/6396140ae1bc3a3cec38a7035a31ca9a5436cca1..8030369ccb5c871d3ce11b96c220f318bc741ed8:/src/undo.c diff --git a/src/undo.c b/src/undo.c index bf0c9f5b66..edb07147a0 100644 --- a/src/undo.c +++ b/src/undo.c @@ -142,7 +142,7 @@ record_delete (beg, string) if (EQ (current_buffer->undo_list, Qt)) return; - if (PT == beg + XSTRING (string)->size) + if (PT == beg + SCHARS (string)) { XSETINT (sbeg, -beg); record_point (PT); @@ -334,7 +334,7 @@ truncate_undo_list (list, minsize, maxsize) size_so_far += sizeof (struct Lisp_Cons); if (STRINGP (XCAR (elt))) size_so_far += (sizeof (struct Lisp_String) - 1 - + XSTRING (XCAR (elt))->size); + + SCHARS (XCAR (elt))); } /* Advance to next element. */ @@ -369,7 +369,7 @@ truncate_undo_list (list, minsize, maxsize) size_so_far += sizeof (struct Lisp_Cons); if (STRINGP (XCAR (elt))) size_so_far += (sizeof (struct Lisp_String) - 1 - + XSTRING (XCAR (elt))->size); + + SCHARS (XCAR (elt))); } /* Advance to next element. */ @@ -399,7 +399,7 @@ Return what remains of the list. */) { struct gcpro gcpro1, gcpro2; Lisp_Object next; - int count = BINDING_STACK_SIZE (); + int count = SPECPDL_INDEX (); register int arg; #if 0 /* This is a good feature, but would make undo-start