Commit 376b0e59 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(display_string, display_text_line):

Display table overrides ordinary display even for \t, \n, etc.
parent fd46fd17
...@@ -2540,8 +2540,15 @@ display_text_line (w, start, vpos, hpos, taboffset) ...@@ -2540,8 +2540,15 @@ display_text_line (w, start, vpos, hpos, taboffset)
p = &FETCH_CHAR (pos); p = &FETCH_CHAR (pos);
} }
c = *p++; c = *p++;
if (c >= 040 && c < 0177 /* Let a display table override all standard display methods. */
&& (dp == 0 || !VECTORP (DISP_CHAR_VECTOR (dp, c)))) if (dp != 0 && VECTORP (DISP_CHAR_VECTOR (dp, c)))
{
p1 = copy_part_of_rope (f, p1, leftmargin,
XVECTOR (DISP_CHAR_VECTOR (dp, c))->contents,
XVECTOR (DISP_CHAR_VECTOR (dp, c))->size,
current_face);
}
else if (c >= 040 && c < 0177)
{ {
if (p1 >= leftmargin) if (p1 >= leftmargin)
*p1 = MAKE_GLYPH (f, c, current_face); *p1 = MAKE_GLYPH (f, c, current_face);
...@@ -2617,13 +2624,6 @@ display_text_line (w, start, vpos, hpos, taboffset) ...@@ -2617,13 +2624,6 @@ display_text_line (w, start, vpos, hpos, taboffset)
#endif #endif
break; break;
} }
else if (dp != 0 && VECTORP (DISP_CHAR_VECTOR (dp, c)))
{
p1 = copy_part_of_rope (f, p1, leftmargin,
XVECTOR (DISP_CHAR_VECTOR (dp, c))->contents,
XVECTOR (DISP_CHAR_VECTOR (dp, c))->size,
current_face);
}
else if (c < 0200 && ctl_arrow) else if (c < 0200 && ctl_arrow)
{ {
if (p1 >= leftmargin) if (p1 >= leftmargin)
...@@ -3734,8 +3734,14 @@ display_string (w, vpos, string, length, hpos, truncate, ...@@ -3734,8 +3734,14 @@ display_string (w, vpos, string, length, hpos, truncate,
else if (c == 0) else if (c == 0)
break; break;
if (c >= 040 && c < 0177 if (dp != 0 && VECTORP (DISP_CHAR_VECTOR (dp, c)))
&& (dp == 0 || !VECTORP (DISP_CHAR_VECTOR (dp, c)))) {
p1 = copy_part_of_rope (f, p1, start,
XVECTOR (DISP_CHAR_VECTOR (dp, c))->contents,
XVECTOR (DISP_CHAR_VECTOR (dp, c))->size,
0);
}
else if (c >= 040 && c < 0177)
{ {
if (p1 >= start) if (p1 >= start)
*p1 = c; *p1 = c;
...@@ -3751,13 +3757,6 @@ display_string (w, vpos, string, length, hpos, truncate, ...@@ -3751,13 +3757,6 @@ display_string (w, vpos, string, length, hpos, truncate,
} }
while ((p1 - start + hscroll - (hscroll > 0)) % tab_width); while ((p1 - start + hscroll - (hscroll > 0)) % tab_width);
} }
else if (dp != 0 && VECTORP (DISP_CHAR_VECTOR (dp, c)))
{
p1 = copy_part_of_rope (f, p1, start,
XVECTOR (DISP_CHAR_VECTOR (dp, c))->contents,
XVECTOR (DISP_CHAR_VECTOR (dp, c))->size,
0);
}
else if (c < 0200 && ! NILP (buffer_defaults.ctl_arrow)) else if (c < 0200 && ! NILP (buffer_defaults.ctl_arrow))
{ {
if (p1 >= start) if (p1 >= start)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment