]> code.delx.au - gnu-emacs/blobdiff - src/undo.c
2002-08-10 Andrew Choi <akochoi@shaw.ca>
[gnu-emacs] / src / undo.c
index bf0c9f5b669b86d99d10257ce9a45117f9694013..edb07147a0ad793771fc5de6f93f3c46b12ba4fe 100644 (file)
@@ -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