comparison src/xdisp.c @ 88906:15e8803e8410

(message_dolog, set_message_1, extend_face_to_end_of_line): Use ASCII_CHAR_P, not SINGLE_BYTE_CHAR_P. (highlight_trailing_whitespace): Adjusted for the change of lookup_named_face.
author Kenichi Handa <handa@m17n.org>
date Fri, 26 Jul 2002 04:07:18 +0000
parents 93014ea2ab20
children 639d0c1fb10e
comparison
equal deleted inserted replaced
88905:4a78174da392 88906:15e8803e8410
5683 /* Convert a multibyte string to single-byte 5683 /* Convert a multibyte string to single-byte
5684 for the *Message* buffer. */ 5684 for the *Message* buffer. */
5685 for (i = 0; i < nbytes; i += nbytes) 5685 for (i = 0; i < nbytes; i += nbytes)
5686 { 5686 {
5687 c = string_char_and_length (m + i, nbytes - i, &char_bytes); 5687 c = string_char_and_length (m + i, nbytes - i, &char_bytes);
5688 work[0] = (SINGLE_BYTE_CHAR_P (c) 5688 work[0] = (ASCII_CHAR_P (c)
5689 ? c 5689 ? c
5690 : multibyte_char_to_unibyte (c, Qnil)); 5690 : multibyte_char_to_unibyte (c, Qnil));
5691 insert_1_both (work, 1, 1, 1, 0, 0); 5691 insert_1_both (work, 1, 1, 1, 0, 0);
5692 } 5692 }
5693 } 5693 }
6944 6944
6945 /* Convert a multibyte string to single-byte. */ 6945 /* Convert a multibyte string to single-byte. */
6946 for (i = 0; i < nbytes; i += n) 6946 for (i = 0; i < nbytes; i += n)
6947 { 6947 {
6948 c = string_char_and_length (s + i, nbytes - i, &n); 6948 c = string_char_and_length (s + i, nbytes - i, &n);
6949 work[0] = (SINGLE_BYTE_CHAR_P (c) 6949 work[0] = (ASCII_CHAR_P (c)
6950 ? c 6950 ? c
6951 : multibyte_char_to_unibyte (c, Qnil)); 6951 : multibyte_char_to_unibyte (c, Qnil));
6952 insert_1_both (work, 1, 1, 1, 0, 0); 6952 insert_1_both (work, 1, 1, 1, 0, 0);
6953 } 6953 }
6954 } 6954 }
12705 12705
12706 /* If current character of IT is not ASCII, make sure we have the 12706 /* If current character of IT is not ASCII, make sure we have the
12707 ASCII face. This will be automatically undone the next time 12707 ASCII face. This will be automatically undone the next time
12708 get_next_display_element returns a multibyte character. Note 12708 get_next_display_element returns a multibyte character. Note
12709 that the character will always be single byte in unibyte text. */ 12709 that the character will always be single byte in unibyte text. */
12710 if (!SINGLE_BYTE_CHAR_P (it->c)) 12710 if (!ASCII_CHAR_P (it->c))
12711 { 12711 {
12712 it->face_id = FACE_FOR_CHAR (f, face, 0); 12712 it->face_id = FACE_FOR_CHAR (f, face, 0);
12713 } 12713 }
12714 12714
12715 if (FRAME_WINDOW_P (f)) 12715 if (FRAME_WINDOW_P (f))
12813 && (glyph->type == STRETCH_GLYPH 12813 && (glyph->type == STRETCH_GLYPH
12814 || (glyph->type == CHAR_GLYPH 12814 || (glyph->type == CHAR_GLYPH
12815 && glyph->u.ch == ' ')) 12815 && glyph->u.ch == ' '))
12816 && trailing_whitespace_p (glyph->charpos)) 12816 && trailing_whitespace_p (glyph->charpos))
12817 { 12817 {
12818 int face_id = lookup_named_face (f, Qtrailing_whitespace, 0); 12818 int face_id = lookup_named_face (f, Qtrailing_whitespace);
12819 12819
12820 while (glyph >= start 12820 while (glyph >= start
12821 && BUFFERP (glyph->object) 12821 && BUFFERP (glyph->object)
12822 && (glyph->type == STRETCH_GLYPH 12822 && (glyph->type == STRETCH_GLYPH
12823 || (glyph->type == CHAR_GLYPH 12823 || (glyph->type == CHAR_GLYPH