diff options
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/xfaces.c | 19 |
2 files changed, 25 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 69be13105dc..7a82c85e0e8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2000-08-28 Miles Bader <miles@gnu.org> | ||
| 2 | |||
| 3 | * xfaces.c (merge_face_vectors): Clear TO's :font attribute if | ||
| 4 | made inconsistent by a font-related attribute in FROM. | ||
| 5 | (merge_face_inheritance): Add function comment. | ||
| 6 | |||
| 1 | 2000-08-28 Kenichi Handa <handa@etl.go.jp> | 7 | 2000-08-28 Kenichi Handa <handa@etl.go.jp> |
| 2 | 8 | ||
| 3 | * keyboard.c (read_char_minibuf_menu_prompt): Call read_char with | 9 | * keyboard.c (read_char_minibuf_menu_prompt): Call read_char with |
diff --git a/src/xfaces.c b/src/xfaces.c index 17f9c5928bb..c75534b30e5 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -3150,6 +3150,18 @@ merge_face_vectors (f, from, to, cycle_check) | |||
| 3150 | && !NILP (from[LFACE_INHERIT_INDEX])) | 3150 | && !NILP (from[LFACE_INHERIT_INDEX])) |
| 3151 | merge_face_inheritance (f, from[LFACE_INHERIT_INDEX], to, cycle_check); | 3151 | merge_face_inheritance (f, from[LFACE_INHERIT_INDEX], to, cycle_check); |
| 3152 | 3152 | ||
| 3153 | /* If TO specifies a :font attribute, and FROM specifies some | ||
| 3154 | font-related attribute, we need to clear TO's :font attribute | ||
| 3155 | (because it will be inconsistent with whatever FROM specifies, and | ||
| 3156 | FROM takes precedence). */ | ||
| 3157 | if (!NILP (to[LFACE_FONT_INDEX]) | ||
| 3158 | && (!UNSPECIFIEDP (from[LFACE_FAMILY_INDEX]) | ||
| 3159 | || !UNSPECIFIEDP (from[LFACE_HEIGHT_INDEX]) | ||
| 3160 | || !UNSPECIFIEDP (from[LFACE_WEIGHT_INDEX]) | ||
| 3161 | || !UNSPECIFIEDP (from[LFACE_SLANT_INDEX]) | ||
| 3162 | || !UNSPECIFIEDP (from[LFACE_SWIDTH_INDEX]))) | ||
| 3163 | to[LFACE_FONT_INDEX] = Qnil; | ||
| 3164 | |||
| 3153 | for (i = 1; i < LFACE_VECTOR_SIZE; ++i) | 3165 | for (i = 1; i < LFACE_VECTOR_SIZE; ++i) |
| 3154 | if (!UNSPECIFIEDP (from[i])) | 3166 | if (!UNSPECIFIEDP (from[i])) |
| 3155 | if (i == LFACE_HEIGHT_INDEX && !INTEGERP (from[i])) | 3167 | if (i == LFACE_HEIGHT_INDEX && !INTEGERP (from[i])) |
| @@ -3187,6 +3199,13 @@ merge_face_vectors (f, from, to, cycle_check) | |||
| 3187 | ? Qnil \ | 3199 | ? Qnil \ |
| 3188 | : Fcons ((el), (check))) | 3200 | : Fcons ((el), (check))) |
| 3189 | 3201 | ||
| 3202 | |||
| 3203 | /* Merge face attributes from the face on frame F whose name is | ||
| 3204 | INHERITS, into the vector of face attributes TO; INHERITS may also be | ||
| 3205 | a list of face names, in which case they are applied in order. | ||
| 3206 | CYCLE_CHECK is used to detect loops in face inheritance. | ||
| 3207 | Returns true if any of the inherited attributes are `font-related'. */ | ||
| 3208 | |||
| 3190 | static void | 3209 | static void |
| 3191 | merge_face_inheritance (f, inherit, to, cycle_check) | 3210 | merge_face_inheritance (f, inherit, to, cycle_check) |
| 3192 | struct frame *f; | 3211 | struct frame *f; |