# HG changeset patch # User Kenichi Handa # Date 958781263 0 # Node ID af50e87cc257843682d1f04e1ce9e8df8fe54aff # Parent 3eec558de0ef14b278d751210d2c22e323955078 (get_next_display_element): Handle 8-bit characters correctly. (next_element_from_display_vector): Use CHAR_BYTES instead of CHAR_LEN. (disp_char_vector): Use SPLIT_CHAR instead of SPLIT_NON_ASCII_CHAR. diff -r 3eec558de0ef -r af50e87cc257 src/xdisp.c --- a/src/xdisp.c Sat May 20 00:07:08 2000 +0000 +++ b/src/xdisp.c Sat May 20 00:07:43 2000 +0000 @@ -3423,7 +3423,7 @@ else { unsigned char str[MAX_MULTIBYTE_LENGTH]; - int len = CHAR_STRING (it->c, str); + int len; int i; GLYPH escape_glyph; @@ -3435,6 +3435,11 @@ else escape_glyph = FAST_MAKE_GLYPH ('\\', 0); + if (SINGLE_BYTE_CHAR_P (it->c)) + str[0] = it->c, len = 1; + else + len = CHAR_STRING (it->c, str); + for (i = 0; i < len; i++) { XSETINT (it->ctl_chars[i * 4], escape_glyph); @@ -3664,7 +3669,7 @@ g = XFASTINT (it->dpvec[it->current.dpvec_index]); it->c = FAST_GLYPH_CHAR (g); - it->len = CHAR_LEN (it->c); + it->len = CHAR_BYTES (it->c); /* The entry may contain a face id to use. Such a face id is the id of a Lisp face, not a realized face. A face id of @@ -7990,7 +7995,7 @@ if (SINGLE_BYTE_CHAR_P (c)) return (dp->contents[c]); - SPLIT_NON_ASCII_CHAR (c, code[0], code[1], code[2]); + SPLIT_CHAR (c, code[0], code[1], code[2]); if (code[1] < 32) code[1] = -1; else if (code[2] < 32)