summaryrefslogtreecommitdiff
path: root/src/undo.c
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@raeburn.org>1999-09-13 03:35:33 +0000
committerKen Raeburn <raeburn@raeburn.org>1999-09-13 03:35:33 +0000
commitc1d497be7013fb68603021cfbd77ec34a9938d0b (patch)
tree14b121ea82a13cb33c4cf35c1dd32f850b9f5458 /src/undo.c
parent03699b140e13aee5b49fa4678e97dff5855e789c (diff)
downloademacs-c1d497be7013fb68603021cfbd77ec34a9938d0b.tar.gz
Use XCAR and XCDR instead of explicit member access.
Diffstat (limited to 'src/undo.c')
-rw-r--r--src/undo.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/undo.c b/src/undo.c
index 86bcdc9977d..51eaa5a2d8d 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -66,13 +66,13 @@ record_insert (beg, length)
if (CONSP (current_buffer->undo_list))
{
Lisp_Object elt;
- elt = XCONS (current_buffer->undo_list)->car;
+ elt = XCAR (current_buffer->undo_list);
if (CONSP (elt)
- && INTEGERP (XCONS (elt)->car)
- && INTEGERP (XCONS (elt)->cdr)
- && XINT (XCONS (elt)->cdr) == beg)
+ && INTEGERP (XCAR (elt))
+ && INTEGERP (XCDR (elt))
+ && XINT (XCDR (elt)) == beg)
{
- XSETINT (XCONS (elt)->cdr, beg + length);
+ XSETINT (XCDR (elt), beg + length);
return;
}
}
@@ -114,10 +114,10 @@ record_delete (beg, string)
while (1)
{
- elt = XCONS (tail)->car;
- if (NILP (elt) || ! (CONSP (elt) && MARKERP (XCONS (elt)->car)))
+ elt = XCAR (tail);
+ if (NILP (elt) || ! (CONSP (elt) && MARKERP (XCAR (elt))))
break;
- tail = XCONS (tail)->cdr;
+ tail = XCDR (tail);
}
at_boundary = NILP (elt);
}
@@ -264,7 +264,7 @@ but another undo command will undo to the previous boundary.")
{
/* If we have preallocated the cons cell to use here,
use that one. */
- XCONS (pending_boundary)->cdr = current_buffer->undo_list;
+ XCDR (pending_boundary) = current_buffer->undo_list;
current_buffer->undo_list = pending_boundary;
pending_boundary = Qnil;
}
@@ -298,33 +298,33 @@ truncate_undo_list (list, minsize, maxsize)
Skip, skip, skip the undo, skip, skip, skip the undo,
Skip, skip, skip the undo, skip to the undo bound'ry.
(Get it? "Skip to my Loo?") */
- if (CONSP (next) && NILP (XCONS (next)->car))
+ if (CONSP (next) && NILP (XCAR (next)))
{
/* Add in the space occupied by this element and its chain link. */
size_so_far += sizeof (struct Lisp_Cons);
/* Advance to next element. */
prev = next;
- next = XCONS (next)->cdr;
+ next = XCDR (next);
}
- while (CONSP (next) && ! NILP (XCONS (next)->car))
+ while (CONSP (next) && ! NILP (XCAR (next)))
{
Lisp_Object elt;
- elt = XCONS (next)->car;
+ elt = XCAR (next);
/* Add in the space occupied by this element and its chain link. */
size_so_far += sizeof (struct Lisp_Cons);
if (CONSP (elt))
{
size_so_far += sizeof (struct Lisp_Cons);
- if (STRINGP (XCONS (elt)->car))
+ if (STRINGP (XCAR (elt)))
size_so_far += (sizeof (struct Lisp_String) - 1
- + XSTRING (XCONS (elt)->car)->size);
+ + XSTRING (XCAR (elt))->size);
}
/* Advance to next element. */
prev = next;
- next = XCONS (next)->cdr;
+ next = XCDR (next);
}
if (CONSP (next))
last_boundary = prev;
@@ -332,7 +332,7 @@ truncate_undo_list (list, minsize, maxsize)
while (CONSP (next))
{
Lisp_Object elt;
- elt = XCONS (next)->car;
+ elt = XCAR (next);
/* When we get to a boundary, decide whether to truncate
either before or after it. The lower threshold, MINSIZE,
@@ -352,14 +352,14 @@ truncate_undo_list (list, minsize, maxsize)
if (CONSP (elt))
{
size_so_far += sizeof (struct Lisp_Cons);
- if (STRINGP (XCONS (elt)->car))
+ if (STRINGP (XCAR (elt)))
size_so_far += (sizeof (struct Lisp_String) - 1
- + XSTRING (XCONS (elt)->car)->size);
+ + XSTRING (XCAR (elt))->size);
}
/* Advance to next element. */
prev = next;
- next = XCONS (next)->cdr;
+ next = XCDR (next);
}
/* If we scanned the whole list, it is short enough; don't change it. */
@@ -369,7 +369,7 @@ truncate_undo_list (list, minsize, maxsize)
/* Truncate at the boundary where we decided to truncate. */
if (!NILP (last_boundary))
{
- XCONS (last_boundary)->cdr = Qnil;
+ XCDR (last_boundary) = Qnil;
return list;
}
else