if (current_buffer != XBUFFER (last_undo_buffer))
Fundo_boundary ();
- XSET (last_undo_buffer, Lisp_Buffer, current_buffer);
+ XSETBUFFER (last_undo_buffer, current_buffer);
if (MODIFF <= current_buffer->save_modified)
record_first_change ();
/* If this is following another insertion and consecutive with it
in the buffer, combine the two. */
- if (XTYPE (current_buffer->undo_list) == Lisp_Cons)
+ if (CONSP (current_buffer->undo_list))
{
Lisp_Object elt;
elt = XCONS (current_buffer->undo_list)->car;
- if (XTYPE (elt) == Lisp_Cons
- && XTYPE (XCONS (elt)->car) == Lisp_Int
- && XTYPE (XCONS (elt)->cdr) == Lisp_Int
+ if (CONSP (elt)
+ && INTEGERP (XCONS (elt)->car)
+ && INTEGERP (XCONS (elt)->cdr)
&& XINT (XCONS (elt)->cdr) == XINT (beg))
{
XSETINT (XCONS (elt)->cdr, XINT (beg) + XINT (length));
}
lbeg = beg;
- XSET (lend, Lisp_Int, XINT (beg) + XINT (length));
+ XSETINT (lend, XINT (beg) + XINT (length));
current_buffer->undo_list = Fcons (Fcons (lbeg, lend),
current_buffer->undo_list);
}
if (current_buffer != XBUFFER (last_undo_buffer))
Fundo_boundary ();
- XSET (last_undo_buffer, Lisp_Buffer, current_buffer);
+ XSETBUFFER (last_undo_buffer, current_buffer);
at_boundary = (CONSP (current_buffer->undo_list)
&& NILP (XCONS (current_buffer->undo_list)->car));
record_first_change ();
if (point == beg + length)
- XSET (sbeg, Lisp_Int, -beg);
+ XSETINT (sbeg, -beg);
else
XFASTINT (sbeg) = beg;
XFASTINT (lbeg) = beg;
if (current_buffer != XBUFFER (last_undo_buffer))
Fundo_boundary ();
- XSET (last_undo_buffer, Lisp_Buffer, current_buffer);
+ XSETBUFFER (last_undo_buffer, current_buffer);
XFASTINT (high) = (current_buffer->modtime >> 16) & 0xffff;
XFASTINT (low) = current_buffer->modtime & 0xffff;
if (MODIFF <= current_buffer->save_modified)
record_first_change ();
- XSET (lbeg, Lisp_Int, beg);
- XSET (lend, Lisp_Int, beg + length);
+ XSETINT (lbeg, beg);
+ XSETINT (lend, beg + length);
entry = Fcons (Qnil, Fcons (prop, Fcons (value, Fcons (lbeg, lend))));
current_buffer->undo_list = Fcons (entry, current_buffer->undo_list);
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 (XTYPE (next) == Lisp_Cons
- && NILP (XCONS (next)->car))
+ if (CONSP (next) && NILP (XCONS (next)->car))
{
/* Add in the space occupied by this element and its chain link. */
size_so_far += sizeof (struct Lisp_Cons);
prev = next;
next = XCONS (next)->cdr;
}
- while (XTYPE (next) == Lisp_Cons
- && ! NILP (XCONS (next)->car))
+ while (CONSP (next) && ! NILP (XCONS (next)->car))
{
Lisp_Object elt;
elt = XCONS (next)->car;
/* Add in the space occupied by this element and its chain link. */
size_so_far += sizeof (struct Lisp_Cons);
- if (XTYPE (elt) == Lisp_Cons)
+ if (CONSP (elt))
{
size_so_far += sizeof (struct Lisp_Cons);
- if (XTYPE (XCONS (elt)->car) == Lisp_String)
+ if (STRINGP (XCONS (elt)->car))
size_so_far += (sizeof (struct Lisp_String) - 1
+ XSTRING (XCONS (elt)->car)->size);
}
prev = next;
next = XCONS (next)->cdr;
}
- if (XTYPE (next) == Lisp_Cons)
+ if (CONSP (next))
last_boundary = prev;
- while (XTYPE (next) == Lisp_Cons)
+ while (CONSP (next))
{
Lisp_Object elt;
elt = XCONS (next)->car;
/* Add in the space occupied by this element and its chain link. */
size_so_far += sizeof (struct Lisp_Cons);
- if (XTYPE (elt) == Lisp_Cons)
+ if (CONSP (elt))
{
size_so_far += sizeof (struct Lisp_Cons);
- if (XTYPE (XCONS (elt)->car) == Lisp_String)
+ if (STRINGP (XCONS (elt)->car))
size_so_far += (sizeof (struct Lisp_String) - 1
+ XSTRING (XCONS (elt)->car)->size);
}
if (NILP (next))
break;
/* Handle an integer by setting point to that value. */
- if (XTYPE (next) == Lisp_Int)
+ if (INTEGERP (next))
SET_PT (clip_to_bounds (BEGV, XINT (next), ZV));
- else if (XTYPE (next) == Lisp_Cons)
+ else if (CONSP (next))
{
Lisp_Object car, cdr;
Fput_text_property (beg, end, prop, val, Qnil);
}
#endif /* USE_TEXT_PROPERTIES */
- else if (XTYPE (car) == Lisp_Int && XTYPE (cdr) == Lisp_Int)
+ else if (INTEGERP (car) && INTEGERP (cdr))
{
/* Element (BEG . END) means range was inserted. */
Lisp_Object end;
Fgoto_char (car);
Fdelete_region (car, cdr);
}
- else if (XTYPE (car) == Lisp_String && XTYPE (cdr) == Lisp_Int)
+ else if (STRINGP (car) && INTEGERP (cdr))
{
/* Element (STRING . POS) means STRING was deleted. */
Lisp_Object membuf;