static void pint2str (register char *, register int, register ptrdiff_t);
static int display_string (const char *, Lisp_Object, Lisp_Object,
- ptrdiff_t, ptrdiff_t, struct it *, int, int, int, int);
+ ptrdiff_t, ptrdiff_t, struct it *, int, int, int,
+ int, bool);
static void compute_line_metrics (struct it *);
static void run_redisplay_end_trigger_hook (struct it *);
static bool get_overlay_strings (struct it *, ptrdiff_t);
if (it.current_x < it.last_visible_x)
display_string (NULL, string, Qnil, 0, 0, &it,
- SCHARS (string), 0, 0, STRING_MULTIBYTE (string));
+ SCHARS (string), 0, 0, STRING_MULTIBYTE (string),
+ TRUE);
}
/* Fill out the line with spaces. */
if (it.current_x < it.last_visible_x)
- display_string ("", Qnil, Qnil, 0, 0, &it, -1, 0, 0, -1);
+ display_string ("", Qnil, Qnil, 0, 0, &it, -1, 0, 0, -1, TRUE);
/* Compute the total height of the lines. */
compute_line_metrics (&it);
/* Display the item, pad with one space. */
if (it.current_x < it.last_visible_x)
display_string (NULL, string, Qnil, 0, 0, &it,
- SCHARS (string) + 1, 0, 0, STRING_MULTIBYTE (string));
+ SCHARS (string) + 1, 0, 0, STRING_MULTIBYTE (string),
+ TRUE);
}
/* Fill out the line with spaces. */
if (it.current_x < it.last_visible_x)
- display_string ("", Qnil, Qnil, 0, 0, &it, -1, 0, 0, -1);
+ display_string ("", Qnil, Qnil, 0, 0, &it, -1, 0, 0, -1, TRUE);
/* Compute the total height of the lines. */
compute_line_metrics (&it);
it.paragraph_embedding = L2R;
/* Pad with a space on the left. */
- display_string (" ", Qnil, Qnil, 0, 0, &it, 1, 0, FRAME_COLS (f) - 1, -1);
+ display_string (" ", Qnil, Qnil, 0, 0, &it, 1, 0, FRAME_COLS (f) - 1, -1,
+ TRUE);
width--;
/* Display the menu item, pad with spaces to WIDTH. */
if (submenu)
{
display_string (item_text, Qnil, Qnil, 0, 0, &it,
- item_len, 0, FRAME_COLS (f) - 1, -1);
+ item_len, 0, FRAME_COLS (f) - 1, -1, TRUE);
width -= item_len;
/* Indicate with " >" that there's a submenu. */
display_string (" >", Qnil, Qnil, 0, 0, &it, width, 0,
- FRAME_COLS (f) - 1, -1);
+ FRAME_COLS (f) - 1, -1, TRUE);
}
else
display_string (item_text, Qnil, Qnil, 0, 0, &it,
- width, 0, FRAME_COLS (f) - 1, -1);
+ width, 0, FRAME_COLS (f) - 1, -1, TRUE);
row->used[TEXT_AREA] = max (saved_used, row->used[TEXT_AREA]);
row->truncated_on_right_p = saved_truncated;
&& window_body_width (XWINDOW (selected_window), FALSE) >=
SCHARS (mode_string))
{
- display_string (SSDATA (mode_string), Qnil, Qnil, 0, 0, &it, 0, 0, 0,
- STRING_MULTIBYTE (mode_string));
+ display_string (SSDATA (mode_string), mode_string, Qnil,
+ 0, 0, &it, 0, 0, 0,
+ STRING_MULTIBYTE (mode_string), FALSE);
}
else
{
*s = 0;
display_string (string, Qnil, Qnil, 0, 0, &it, 0, 0, 0,
- STRING_MULTIBYTE (mode_string));
+ STRING_MULTIBYTE (mode_string), TRUE);
xfree (string);
}
}
unbind_to (count, Qnil);
/* Fill up with spaces. */
- display_string (" ", Qnil, Qnil, 0, 0, &it, 10000, -1, -1, 0);
+ display_string (" ", Qnil, Qnil, 0, 0, &it, 10000, -1, -1, 0, TRUE);
compute_line_metrics (&it);
it.glyph_row->full_width_p = true;
break;
case MODE_LINE_DISPLAY:
n += display_string (NULL, elt, Qnil, 0, 0, it,
- 0, prec, 0, STRING_MULTIBYTE (elt));
+ 0, prec, 0, STRING_MULTIBYTE (elt), TRUE);
break;
}
nchars = string_byte_to_char (elt, offset) - charpos;
n += display_string (NULL, elt, Qnil, 0, charpos,
it, 0, nchars, 0,
- STRING_MULTIBYTE (elt));
+ STRING_MULTIBYTE (elt), TRUE);
}
break;
}
nwritten = display_string (spec, string, elt,
charpos, 0, it,
field, prec, 0,
- multibyte);
+ multibyte, TRUE);
/* Assign to the glyphs written above the
string where the `%x' came from, position
break;
case MODE_LINE_DISPLAY:
n += display_string ("", Qnil, Qnil, 0, 0, it, field_width - n,
- 0, 0, 0);
+ 0, 0, 0, TRUE);
break;
}
}
static int
display_string (const char *string, Lisp_Object lisp_string, Lisp_Object face_string,
ptrdiff_t face_string_pos, ptrdiff_t start, struct it *it,
- int field_width, int precision, int max_x, int multibyte)
+ int field_width, int precision, int max_x, int multibyte,
+ bool ignore_text_properties)
{
int hpos_at_start = it->hpos;
int saved_face_id = it->face_id;
with index START. */
reseat_to_string (it, NILP (lisp_string) ? string : NULL, lisp_string,
start, precision, field_width, multibyte);
- if (string && STRINGP (lisp_string))
+
+ if (string && STRINGP (lisp_string) && ignore_text_properties)
/* LISP_STRING is the one returned by decode_mode_spec. We should
ignore its text properties. */
it->stop_charpos = it->end_charpos;