diff options
| author | Kenichi Handa | 2000-05-20 00:07:43 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2000-05-20 00:07:43 +0000 |
| commit | c5924f47e9335d100b81184d176d1a68ffaac5ea (patch) | |
| tree | 4a190836fd8060f2767e7807c36727b17a4f9d9f | |
| parent | 69ebbf81b16055de5f02501e0cb056e45352d423 (diff) | |
| download | emacs-c5924f47e9335d100b81184d176d1a68ffaac5ea.tar.gz emacs-c5924f47e9335d100b81184d176d1a68ffaac5ea.zip | |
(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.
| -rw-r--r-- | src/xdisp.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 30f7a00ec01..b441f5a2488 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -3423,7 +3423,7 @@ get_next_display_element (it) | |||
| 3423 | else | 3423 | else |
| 3424 | { | 3424 | { |
| 3425 | unsigned char str[MAX_MULTIBYTE_LENGTH]; | 3425 | unsigned char str[MAX_MULTIBYTE_LENGTH]; |
| 3426 | int len = CHAR_STRING (it->c, str); | 3426 | int len; |
| 3427 | int i; | 3427 | int i; |
| 3428 | GLYPH escape_glyph; | 3428 | GLYPH escape_glyph; |
| 3429 | 3429 | ||
| @@ -3435,6 +3435,11 @@ get_next_display_element (it) | |||
| 3435 | else | 3435 | else |
| 3436 | escape_glyph = FAST_MAKE_GLYPH ('\\', 0); | 3436 | escape_glyph = FAST_MAKE_GLYPH ('\\', 0); |
| 3437 | 3437 | ||
| 3438 | if (SINGLE_BYTE_CHAR_P (it->c)) | ||
| 3439 | str[0] = it->c, len = 1; | ||
| 3440 | else | ||
| 3441 | len = CHAR_STRING (it->c, str); | ||
| 3442 | |||
| 3438 | for (i = 0; i < len; i++) | 3443 | for (i = 0; i < len; i++) |
| 3439 | { | 3444 | { |
| 3440 | XSETINT (it->ctl_chars[i * 4], escape_glyph); | 3445 | XSETINT (it->ctl_chars[i * 4], escape_glyph); |
| @@ -3664,7 +3669,7 @@ next_element_from_display_vector (it) | |||
| 3664 | 3669 | ||
| 3665 | g = XFASTINT (it->dpvec[it->current.dpvec_index]); | 3670 | g = XFASTINT (it->dpvec[it->current.dpvec_index]); |
| 3666 | it->c = FAST_GLYPH_CHAR (g); | 3671 | it->c = FAST_GLYPH_CHAR (g); |
| 3667 | it->len = CHAR_LEN (it->c); | 3672 | it->len = CHAR_BYTES (it->c); |
| 3668 | 3673 | ||
| 3669 | /* The entry may contain a face id to use. Such a face id is | 3674 | /* The entry may contain a face id to use. Such a face id is |
| 3670 | the id of a Lisp face, not a realized face. A face id of | 3675 | the id of a Lisp face, not a realized face. A face id of |
| @@ -7990,7 +7995,7 @@ disp_char_vector (dp, c) | |||
| 7990 | if (SINGLE_BYTE_CHAR_P (c)) | 7995 | if (SINGLE_BYTE_CHAR_P (c)) |
| 7991 | return (dp->contents[c]); | 7996 | return (dp->contents[c]); |
| 7992 | 7997 | ||
| 7993 | SPLIT_NON_ASCII_CHAR (c, code[0], code[1], code[2]); | 7998 | SPLIT_CHAR (c, code[0], code[1], code[2]); |
| 7994 | if (code[1] < 32) | 7999 | if (code[1] < 32) |
| 7995 | code[1] = -1; | 8000 | code[1] = -1; |
| 7996 | else if (code[2] < 32) | 8001 | else if (code[2] < 32) |