Commit 5ee43ba0 authored by Eli Zaretskii's avatar Eli Zaretskii

Another fix for :extend when :inherit is used

* src/xfaces.c (face_inherited_attr): Support also values of
:inherit which are lists.  (Bug#37774)
parent 21790e54
Pipeline #4252 failed with stage
in 58 minutes and 10 seconds
......@@ -2163,11 +2163,31 @@ face_inherited_attr (struct window *w, struct frame *f,
&& !UNSPECIFIEDP (inherited_attrs[LFACE_INHERIT_INDEX]))
{
Lisp_Object parent_face = inherited_attrs[LFACE_INHERIT_INDEX];
bool ok = get_lface_attributes (w, f, parent_face, inherited_attrs,
false, named_merge_points);
if (!ok)
break;
attr_val = inherited_attrs[attr_idx];
bool ok;
if (CONSP (parent_face))
{
Lisp_Object tail;
for (tail = parent_face; !NILP (tail); tail = XCDR (tail))
{
ok = get_lface_attributes (w, f, XCAR (tail), inherited_attrs,
false, named_merge_points);
if (!ok)
break;
attr_val = face_inherited_attr (w, f, inherited_attrs, attr_idx,
named_merge_points);
if (!UNSPECIFIEDP (attr_val))
break;
}
}
else
{
ok = get_lface_attributes (w, f, parent_face, inherited_attrs,
false, named_merge_points);
if (!ok)
break;
attr_val = inherited_attrs[attr_idx];
}
}
return attr_val;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment