From: Richard M. Stallman Date: Fri, 24 Feb 1995 18:49:48 +0000 (+0000) Subject: (display_string, display_text_line): X-Git-Tag: emacs-19.34~5036 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=376b0e59540adfb3a56368046b5c8cfdff7cd76b;p=emacs.git (display_string, display_text_line): Display table overrides ordinary display even for \t, \n, etc. --- diff --git a/src/xdisp.c b/src/xdisp.c index e800c42d754..9c9dbe878a6 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -2540,8 +2540,15 @@ display_text_line (w, start, vpos, hpos, taboffset) p = &FETCH_CHAR (pos); } c = *p++; - if (c >= 040 && c < 0177 - && (dp == 0 || !VECTORP (DISP_CHAR_VECTOR (dp, c)))) + /* Let a display table override all standard display methods. */ + 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) *p1 = MAKE_GLYPH (f, c, current_face); @@ -2617,13 +2624,6 @@ display_text_line (w, start, vpos, hpos, taboffset) #endif 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) { if (p1 >= leftmargin) @@ -3734,8 +3734,14 @@ display_string (w, vpos, string, length, hpos, truncate, else if (c == 0) break; - if (c >= 040 && c < 0177 - && (dp == 0 || !VECTORP (DISP_CHAR_VECTOR (dp, c)))) + 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 >= 040 && c < 0177) { if (p1 >= start) *p1 = c; @@ -3751,13 +3757,6 @@ display_string (w, vpos, string, length, hpos, truncate, } 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)) { if (p1 >= start)