changeset 1524:91454bf15944

* undo.c (record_insert): Use accessors on BEG and LENGTH. (truncate_undo_list): Use NILP, not == Qnil.
author Jim Blandy <jimb@redhat.com>
date Sat, 31 Oct 1992 05:39:17 +0000
parents bd61aaa7828b
children f79a22ad87d0
files src/undo.c
diffstat 1 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/undo.c	Sat Oct 31 05:38:19 1992 +0000
+++ b/src/undo.c	Sat Oct 31 05:39:17 1992 +0000
@@ -54,16 +54,17 @@
       if (XTYPE (elt) == Lisp_Cons
 	  && XTYPE (XCONS (elt)->car) == Lisp_Int
 	  && XTYPE (XCONS (elt)->cdr) == Lisp_Int
-	  && XINT (XCONS (elt)->cdr) == beg)
+	  && XINT (XCONS (elt)->cdr) == XINT (beg))
 	{
-	  XSETINT (XCONS (elt)->cdr, beg + length);
+	  XSETINT (XCONS (elt)->cdr, XINT (beg) + XINT (length));
 	  return;
 	}
     }
 
-  XFASTINT (lbeg) = beg;
-  XFASTINT (lend) = beg + length;
-  current_buffer->undo_list = Fcons (Fcons (lbeg, lend), current_buffer->undo_list);
+  lbeg = beg;
+  XSET (lend, Lisp_Int, XINT (beg) + XINT (length));
+  current_buffer->undo_list = Fcons (Fcons (lbeg, lend),
+                                     current_buffer->undo_list);
 }
 
 /* Record that a deletion is about to take place,
@@ -163,7 +164,7 @@
      Skip, skip, skip the undo, skip to the undo bound'ry. 
      (Get it?  "Skip to my Loo?")  */
   if (XTYPE (next) == Lisp_Cons
-      && XCONS (next)->car == Qnil)
+      && NILP (XCONS (next)->car))
     {
       /* Add in the space occupied by this element and its chain link.  */
       size_so_far += sizeof (struct Lisp_Cons);
@@ -173,7 +174,7 @@
       next = XCONS (next)->cdr;
     }
   while (XTYPE (next) == Lisp_Cons
-	 && XCONS (next)->car != Qnil)
+	 && ! NILP (XCONS (next)->car))
     {
       Lisp_Object elt;
       elt = XCONS (next)->car;