Mercurial > emacs
comparison src/xdisp.c @ 59457:fae5995f1816
(get_next_display_element, next_element_from_display_vector):
Don't lookup lface_id from display table glyphs here; instead use
merge_faces to merge the lisp face id into current face.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Mon, 10 Jan 2005 13:34:53 +0000 |
parents | 1a855ee4f5fd |
children | 1cf4d84c9eb7 |
comparison
equal
deleted
inserted
replaced
59456:08a75ace96a6 | 59457:fae5995f1816 |
---|---|
4976 g = XINT (DISP_CTRL_GLYPH (it->dp)); | 4976 g = XINT (DISP_CTRL_GLYPH (it->dp)); |
4977 lface_id = FAST_GLYPH_FACE (g); | 4977 lface_id = FAST_GLYPH_FACE (g); |
4978 if (lface_id) | 4978 if (lface_id) |
4979 { | 4979 { |
4980 g = FAST_GLYPH_CHAR (g); | 4980 g = FAST_GLYPH_CHAR (g); |
4981 /* The function returns -1 if lface_id is invalid. */ | 4981 face_id = merge_faces (it->f, Qt, lface_id, |
4982 face_id = ascii_face_of_lisp_face (it->f, lface_id); | 4982 it->face_id); |
4983 if (face_id >= 0) | |
4984 face_id = merge_into_realized_face (it->f, Qnil, | |
4985 face_id, it->face_id); | |
4986 } | 4983 } |
4987 } | 4984 } |
4988 else | 4985 else |
4989 { | 4986 { |
4990 /* Merge the escape-glyph face into the current face. */ | 4987 /* Merge the escape-glyph face into the current face. */ |
4991 face_id = merge_into_realized_face (it->f, Qescape_glyph, | 4988 face_id = merge_faces (it->f, Qescape_glyph, 0, |
4992 0, it->face_id); | 4989 it->face_id); |
4993 g = '^'; | 4990 g = '^'; |
4994 } | 4991 } |
4995 | 4992 |
4996 XSETINT (it->ctl_chars[0], g); | 4993 XSETINT (it->ctl_chars[0], g); |
4997 g = it->c ^ 0100; | 4994 g = it->c ^ 0100; |
5007 escape_glyph = XFASTINT (DISP_ESCAPE_GLYPH (it->dp)); | 5004 escape_glyph = XFASTINT (DISP_ESCAPE_GLYPH (it->dp)); |
5008 lface_id = FAST_GLYPH_FACE (escape_glyph); | 5005 lface_id = FAST_GLYPH_FACE (escape_glyph); |
5009 if (lface_id) | 5006 if (lface_id) |
5010 { | 5007 { |
5011 escape_glyph = FAST_GLYPH_CHAR (escape_glyph); | 5008 escape_glyph = FAST_GLYPH_CHAR (escape_glyph); |
5012 /* The function returns -1 if lface_id is invalid. */ | 5009 face_id = merge_faces (it->f, Qt, lface_id, |
5013 face_id = ascii_face_of_lisp_face (it->f, lface_id); | 5010 it->face_id); |
5014 if (face_id >= 0) | |
5015 face_id = merge_into_realized_face (it->f, Qnil, | |
5016 face_id, it->face_id); | |
5017 } | 5011 } |
5018 } | 5012 } |
5019 else | 5013 else |
5020 { | 5014 { |
5021 /* Merge the escape-glyph face into the current face. */ | 5015 /* Merge the escape-glyph face into the current face. */ |
5022 face_id = merge_into_realized_face (it->f, Qescape_glyph, | 5016 face_id = merge_faces (it->f, Qescape_glyph, 0, |
5023 0, it->face_id); | 5017 it->face_id); |
5024 escape_glyph = '\\'; | 5018 escape_glyph = '\\'; |
5025 } | 5019 } |
5026 | 5020 |
5027 if (it->c == 0x8a0 || it->c == 0x8ad) | 5021 if (it->c == 0x8a0 || it->c == 0x8ad) |
5028 { | 5022 { |
5307 if (it->dpvec_face_id >= 0) | 5301 if (it->dpvec_face_id >= 0) |
5308 it->face_id = it->dpvec_face_id; | 5302 it->face_id = it->dpvec_face_id; |
5309 else | 5303 else |
5310 { | 5304 { |
5311 int lface_id = FAST_GLYPH_FACE (g); | 5305 int lface_id = FAST_GLYPH_FACE (g); |
5312 if (lface_id) | 5306 if (lface_id > 0) |
5313 { | 5307 it->face_id = merge_faces (it->f, Qt, lface_id, |
5314 /* The function returns -1 if lface_id is invalid. */ | 5308 it->saved_face_id); |
5315 int face_id = ascii_face_of_lisp_face (it->f, lface_id); | |
5316 if (face_id >= 0) | |
5317 it->face_id = face_id; | |
5318 } | |
5319 } | 5309 } |
5320 } | 5310 } |
5321 else | 5311 else |
5322 /* Display table entry is invalid. Return a space. */ | 5312 /* Display table entry is invalid. Return a space. */ |
5323 it->c = ' ', it->len = 1; | 5313 it->c = ' ', it->len = 1; |