diff options
| -rw-r--r-- | src/xfaces.c | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/src/xfaces.c b/src/xfaces.c index 440cf4f1917..6db4dcd226f 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -2163,11 +2163,31 @@ face_inherited_attr (struct window *w, struct frame *f, | |||
| 2163 | && !UNSPECIFIEDP (inherited_attrs[LFACE_INHERIT_INDEX])) | 2163 | && !UNSPECIFIEDP (inherited_attrs[LFACE_INHERIT_INDEX])) |
| 2164 | { | 2164 | { |
| 2165 | Lisp_Object parent_face = inherited_attrs[LFACE_INHERIT_INDEX]; | 2165 | Lisp_Object parent_face = inherited_attrs[LFACE_INHERIT_INDEX]; |
| 2166 | bool ok = get_lface_attributes (w, f, parent_face, inherited_attrs, | 2166 | bool ok; |
| 2167 | false, named_merge_points); | 2167 | |
| 2168 | if (!ok) | 2168 | if (CONSP (parent_face)) |
| 2169 | break; | 2169 | { |
| 2170 | attr_val = inherited_attrs[attr_idx]; | 2170 | Lisp_Object tail; |
| 2171 | for (tail = parent_face; !NILP (tail); tail = XCDR (tail)) | ||
| 2172 | { | ||
| 2173 | ok = get_lface_attributes (w, f, XCAR (tail), inherited_attrs, | ||
| 2174 | false, named_merge_points); | ||
| 2175 | if (!ok) | ||
| 2176 | break; | ||
| 2177 | attr_val = face_inherited_attr (w, f, inherited_attrs, attr_idx, | ||
| 2178 | named_merge_points); | ||
| 2179 | if (!UNSPECIFIEDP (attr_val)) | ||
| 2180 | break; | ||
| 2181 | } | ||
| 2182 | } | ||
| 2183 | else | ||
| 2184 | { | ||
| 2185 | ok = get_lface_attributes (w, f, parent_face, inherited_attrs, | ||
| 2186 | false, named_merge_points); | ||
| 2187 | if (!ok) | ||
| 2188 | break; | ||
| 2189 | attr_val = inherited_attrs[attr_idx]; | ||
| 2190 | } | ||
| 2171 | } | 2191 | } |
| 2172 | return attr_val; | 2192 | return attr_val; |
| 2173 | } | 2193 | } |