[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 5ee43ba: Another fix for :extend when :inherit is used
From: |
Eli Zaretskii |
Subject: |
master 5ee43ba: Another fix for :extend when :inherit is used |
Date: |
Thu, 5 Dec 2019 12:59:09 -0500 (EST) |
branch: master
commit 5ee43ba0dfd96e5d39da556260346bd3c8ff99c1
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Another fix for :extend when :inherit is used
* src/xfaces.c (face_inherited_attr): Support also values of
:inherit which are lists. (Bug#37774)
---
src/xfaces.c | 30 +++++++++++++++++++++++++-----
1 file changed, 25 insertions(+), 5 deletions(-)
diff --git a/src/xfaces.c b/src/xfaces.c
index 440cf4f..6db4dcd 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -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;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 5ee43ba: Another fix for :extend when :inherit is used,
Eli Zaretskii <=