eassert (!it->bidi_p || it->s == it->bidi_it.string.s);
it->what = IT_CHARACTER;
BYTEPOS (it->position) = CHARPOS (it->position) = 0;
- it->object = Qnil;
+ it->object = make_number (0);
/* With bidi reordering, the character to display might not be the
character at IT_CHARPOS. BIDI_IT.FIRST_ELT non-zero means that
if (!row->reversed_p)
{
while (glyph < end
- && INTEGERP (glyph->object)
+ && NILP (glyph->object)
&& glyph->charpos < 0)
{
x += glyph->pixel_width;
++glyph;
}
while (end > glyph
- && INTEGERP ((end - 1)->object)
+ && NILP ((end - 1)->object)
/* CHARPOS is zero for blanks and stretch glyphs
inserted by extend_face_to_end_of_line. */
&& (end - 1)->charpos <= 0)
glyph += row->used[TEXT_AREA] - 1;
while (glyph > end + 1
- && INTEGERP (glyph->object)
+ && NILP (glyph->object)
&& glyph->charpos < 0)
{
--glyph;
x -= glyph->pixel_width;
}
- if (INTEGERP (glyph->object) && glyph->charpos < 0)
+ if (NILP (glyph->object) && glyph->charpos < 0)
--glyph;
/* By default, in reversed rows we put the cursor on the
rightmost (first in the reading order) glyph. */
for (g = end + 1; g < glyph; g++)
x += g->pixel_width;
while (end < glyph
- && INTEGERP ((end + 1)->object)
+ && NILP ((end + 1)->object)
&& (end + 1)->charpos <= 0)
++end;
glyph_before = glyph + 1;
while (/* not marched to end of glyph row */
glyph < end
/* glyph was not inserted by redisplay for internal purposes */
- && !INTEGERP (glyph->object))
+ && !NILP (glyph->object))
{
if (BUFFERP (glyph->object))
{
++glyph;
}
else if (glyph > end) /* row is reversed */
- while (!INTEGERP (glyph->object))
+ while (!NILP (glyph->object))
{
if (BUFFERP (glyph->object))
{
&& BUFFERP (glyph->object) && glyph->charpos == pt_old)
&& !(bpos_max <= pt_old && pt_old <= bpos_covered))
{
- /* An empty line has a single glyph whose OBJECT is zero and
+ /* An empty line has a single glyph whose OBJECT is nil and
whose CHARPOS is the position of a newline on that line.
Note that on a TTY, there are more glyphs after that, which
were produced by extend_face_to_end_of_line, but their
CHARPOS is zero or negative. */
int empty_line_p =
(row->reversed_p ? glyph > glyphs_end : glyph < glyphs_end)
- && INTEGERP (glyph->object) && glyph->charpos > 0
+ && NILP (glyph->object) && glyph->charpos > 0
/* On a TTY, continued and truncated rows also have a glyph at
- their end whose OBJECT is zero and whose CHARPOS is
+ their end whose OBJECT is nil and whose CHARPOS is
positive (the continuation and truncation glyphs), but such
rows are obviously not "empty". */
&& !(row->continued_p || row->truncated_on_right_p);
&& string_from_text_prop)
/* this candidate is from newline and its
position is not an exact match */
- || (INTEGERP (glyph->object)
+ || (NILP (glyph->object)
&& glyph->charpos != pt_old)))))
return 0;
/* If this candidate gives an exact match, use that. */
terminating newline of a line, and point is on that
newline, it wins because it's an exact match. */
|| (!row->continued_p
- && INTEGERP (glyph->object)
+ && NILP (glyph->object)
&& glyph->charpos == 0
&& pt_old == MATRIX_ROW_END_CHARPOS (row) - 1))
/* Otherwise, keep the candidate that comes from a row
exact_match_p =
(BUFFERP (g->object) && g->charpos == PT)
- || (INTEGERP (g->object)
+ || (NILP (g->object)
&& (g->charpos == PT
|| (g->charpos == 0 && endpos - 1 == PT)));
}
? 'B'
: (STRINGP (glyph->object)
? 'S'
- : (INTEGERP (glyph->object)
+ : (NILP (glyph->object)
? '0'
: '-'))),
glyph->pixel_width,
? 'B'
: (STRINGP (glyph->object)
? 'S'
- : (INTEGERP (glyph->object)
+ : (NILP (glyph->object)
? '0'
: '-'))),
glyph->pixel_width,
? 'B'
: (STRINGP (glyph->object)
? 'S'
- : (INTEGERP (glyph->object)
+ : (NILP (glyph->object)
? '0'
: '-'))),
glyph->pixel_width,
? 'B'
: (STRINGP (glyph->object)
? 'S'
- : (INTEGERP (glyph->object)
+ : (NILP (glyph->object)
? '0'
: '-'))),
glyph->pixel_width,
struct glyph *glyph = row->glyphs[area] + i;
if (i == row->used[area] - 1
&& area == TEXT_AREA
- && INTEGERP (glyph->object)
+ && NILP (glyph->object)
&& glyph->type == CHAR_GLYPH
&& glyph->u.ch == ' ')
{
truncate_it.area = TEXT_AREA;
truncate_it.glyph_row->used[TEXT_AREA] = 0;
CHARPOS (truncate_it.position) = BYTEPOS (truncate_it.position) = -1;
- truncate_it.object = make_number (0);
+ truncate_it.object = Qnil;
produce_special_glyphs (&truncate_it, IT_TRUNCATION);
/* Overwrite glyphs from IT with truncation glyphs. */
it->what = IT_CHARACTER;
memset (&it->position, 0, sizeof it->position);
- it->object = make_number (0);
+ it->object = Qnil;
it->c = it->char_to_display = ' ';
it->len = 1;
else
it->face_id = face->id;
it->start_of_box_run_p = 0;
- append_stretch_glyph (it, make_number (0), stretch_width,
+ append_stretch_glyph (it, Qnil, stretch_width,
it->ascent + it->descent, stretch_ascent);
it->position = saved_pos;
it->avoid_cursor_p = saved_avoid_cursor;
it->what = IT_CHARACTER;
memset (&it->position, 0, sizeof it->position);
- it->object = make_number (0);
+ it->object = Qnil;
it->c = it->char_to_display = ' ';
it->len = 1;
{
while (glyph >= start
&& glyph->type == CHAR_GLYPH
- && INTEGERP (glyph->object))
+ && NILP (glyph->object))
--glyph;
}
else
{
while (glyph <= start
&& glyph->type == CHAR_GLYPH
- && INTEGERP (glyph->object))
+ && NILP (glyph->object))
++glyph;
}
{
start = r1->glyphs[TEXT_AREA];
end = start + r1->used[TEXT_AREA];
- /* Glyphs inserted by redisplay have an integer (zero)
- as their object. */
+ /* Glyphs inserted by redisplay have nil as their object. */
while (end > start
- && INTEGERP ((end - 1)->object)
+ && NILP ((end - 1)->object)
&& (end - 1)->charpos <= 0)
--end;
if (end > start)
end = r1->glyphs[TEXT_AREA] - 1;
start = end + r1->used[TEXT_AREA];
while (end < start
- && INTEGERP ((end + 1)->object)
+ && NILP ((end + 1)->object)
&& (end + 1)->charpos <= 0)
++end;
if (end < start)
#define ROW_GLYPH_NEWLINE_P(ROW,GLYPH) \
(!(ROW)->continued_p \
- && INTEGERP ((GLYPH)->object) \
+ && NILP ((GLYPH)->object) \
&& (GLYPH)->type == CHAR_GLYPH \
&& (GLYPH)->u.ch == ' ' \
&& (GLYPH)->charpos >= 0 \
w->cursor.vpos = -1;
return make_number (PT);
}
- else if (!INTEGERP (g->object) && !EQ (g->object, gpt->object))
+ else if (!NILP (g->object) && !EQ (g->object, gpt->object))
{
ptrdiff_t new_pos;
return make_number (PT);
}
}
- if (g == e || INTEGERP (g->object))
+ if (g == e || NILP (g->object))
{
if (row->truncated_on_left_p || row->truncated_on_right_p)
goto simulate_display;
EOB also has one glyph, but its charpos is -1. */
|| (row->ends_at_zv_p
&& !row->reversed_p
- && INTEGERP (g->object)
+ && NILP (g->object)
&& g->type == CHAR_GLYPH
&& g->u.ch == ' '))
{
|| g->type == STRETCH_GLYPH
|| (row->ends_at_zv_p
&& row->reversed_p
- && INTEGERP (g->object)
+ && NILP (g->object)
&& g->type == CHAR_GLYPH
&& g->u.ch == ' '))
{
/* Skip over glyphs at the start of the row that was
generated by redisplay for its own needs. */
while (g < e
- && INTEGERP (g->object)
+ && NILP (g->object)
&& g->charpos < 0)
g++;
g1 = g;
/* Count the "interesting" glyphs in this row. */
- for (nglyphs = 0; g < e && !INTEGERP (g->object); g++)
+ for (nglyphs = 0; g < e && !NILP (g->object); g++)
nglyphs++;
/* Create and fill the array. */
g = row->glyphs[TEXT_AREA] + row->used[TEXT_AREA] - 1;
e = row->glyphs[TEXT_AREA] - 1;
while (g > e
- && INTEGERP (g->object)
+ && NILP (g->object)
&& g->charpos < 0)
g--;
g1 = g;
- for (nglyphs = 0; g > e && !INTEGERP (g->object); g--)
+ for (nglyphs = 0; g > e && !NILP (g->object); g--)
nglyphs++;
levels = make_uninit_vector (nglyphs);
for (i = 0; g1 > g; i++, g1--)
GLYPH glyph;
temp_it = *it;
- temp_it.object = make_number (0);
+ temp_it.object = Qnil;
memset (&temp_it.current, 0, sizeof temp_it.current);
if (what == IT_CONTINUATION)
(((temp_it.ascent + temp_it.descent)
* FONT_BASE (font)) / FONT_HEIGHT (font));
- append_stretch_glyph (&temp_it, make_number (0), stretch_width,
+ append_stretch_glyph (&temp_it, Qnil, stretch_width,
temp_it.ascent + temp_it.descent,
stretch_ascent);
}
while (g < e)
{
- if (((BUFFERP (g->object) || INTEGERP (g->object))
+ if (((BUFFERP (g->object) || NILP (g->object))
&& start_charpos <= g->charpos && g->charpos < end_charpos)
/* A glyph that comes from DISP_STRING is by
definition to be highlighted. */
while (g < e)
{
- if (((BUFFERP (g->object) || INTEGERP (g->object))
+ if (((BUFFERP (g->object) || NILP (g->object))
&& ((start_charpos <= g->charpos && g->charpos < end_charpos)
/* If the buffer position of the first glyph in
the row is equal to END_CHARPOS, it means
{
struct glyph *beg = prev->glyphs[TEXT_AREA];
glyph = beg + prev->used[TEXT_AREA];
- while (--glyph >= beg && INTEGERP (glyph->object));
+ while (--glyph >= beg && NILP (glyph->object));
if (glyph < beg
|| !(EQ (glyph->object, before_string)
|| EQ (glyph->object, disp_string)))
/* Skip truncation glyphs at the start of the glyph row. */
if (MATRIX_ROW_DISPLAYS_TEXT_P (r1))
for (; glyph < end
- && INTEGERP (glyph->object)
+ && NILP (glyph->object)
&& glyph->charpos < 0;
++glyph)
x += glyph->pixel_width;
or DISP_STRING, and the first glyph from buffer whose
position is between START_CHARPOS and END_CHARPOS. */
for (; glyph < end
- && !INTEGERP (glyph->object)
+ && !NILP (glyph->object)
&& !EQ (glyph->object, disp_string)
&& !(BUFFERP (glyph->object)
&& (glyph->charpos >= start_charpos
/* Skip truncation glyphs at the start of the glyph row. */
if (MATRIX_ROW_DISPLAYS_TEXT_P (r1))
for (; glyph > end
- && INTEGERP (glyph->object)
+ && NILP (glyph->object)
&& glyph->charpos < 0;
--glyph)
;
or DISP_STRING, and the first glyph from buffer whose
position is between START_CHARPOS and END_CHARPOS. */
for (; glyph > end
- && !INTEGERP (glyph->object)
+ && !NILP (glyph->object)
&& !EQ (glyph->object, disp_string)
&& !(BUFFERP (glyph->object)
&& (glyph->charpos >= start_charpos
row, and also blanks and stretch glyphs inserted by
extend_face_to_end_of_line. */
while (end > glyph
- && INTEGERP ((end - 1)->object))
+ && NILP ((end - 1)->object))
--end;
/* Scan the rest of the glyph row from the end, looking for the
first glyph that comes from BEFORE_STRING, AFTER_STRING, or
and END_CHARPOS */
for (--end;
end > glyph
- && !INTEGERP (end->object)
+ && !NILP (end->object)
&& !EQ (end->object, disp_string)
&& !(BUFFERP (end->object)
&& (end->charpos >= start_charpos
x = r2->x;
end++;
while (end < glyph
- && INTEGERP (end->object))
+ && NILP (end->object))
{
x += end->pixel_width;
++end;
and END_CHARPOS */
for ( ;
end < glyph
- && !INTEGERP (end->object)
+ && !NILP (end->object)
&& !EQ (end->object, disp_string)
&& !(BUFFERP (end->object)
&& (end->charpos >= start_charpos
if (glyph == NULL
|| area != TEXT_AREA
|| !MATRIX_ROW_DISPLAYS_TEXT_P (MATRIX_ROW (w->current_matrix, vpos))
- /* Glyph's OBJECT is an integer for glyphs inserted by the
+ /* Glyph's OBJECT is nil for glyphs inserted by the
display engine for its internal purposes, like truncation
and continuation glyphs and blanks beyond the end of
line's text on text terminals. If we are over such a
glyph, we are not over any text. */
- || INTEGERP (glyph->object)
+ || NILP (glyph->object)
/* R2L rows have a stretch glyph at their front, which
stands for no text, whereas L2R rows have no glyphs at
all beyond the end of text. Treat such stretch glyphs