[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 8232325: Handle case where a face's :extend attribute is unspecif
From: |
Martin Rudalics |
Subject: |
master 8232325: Handle case where a face's :extend attribute is unspecified (Bug#37774) |
Date: |
Fri, 8 Nov 2019 03:33:43 -0500 (EST) |
branch: master
commit 82323253378c310c71cfea393d228321d1fc51f4
Author: Jimmy Aguilar Mena <address@hidden>
Commit: Martin Rudalics <address@hidden>
Handle case where a face's :extend attribute is unspecified (Bug#37774)
* src/xfaces.c (merge_face_vectors, merge_named_face): Handle case
where the :extend attribute's value is 'unspecified' (Bug#37774).
---
src/xfaces.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/xfaces.c b/src/xfaces.c
index 3806fa9..67fa9e2 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -2062,8 +2062,13 @@ merge_face_vectors (struct window *w, struct frame *f,
eassert (attr_filter < LFACE_VECTOR_SIZE);
- /* When FROM sets attr_filter to nil explicitly we don't merge it. */
- if (attr_filter > 0 && NILP(from[attr_filter]))
+ /* When FROM sets attr_filter explicitly to nil or unspecified
+ without inheriting don't merge it. */
+ if (attr_filter > 0
+ && (NILP(from[attr_filter])
+ || (UNSPECIFIEDP(from[attr_filter])
+ && (NILP (from[LFACE_INHERIT_INDEX])
+ || UNSPECIFIEDP (from[LFACE_INHERIT_INDEX])))))
return;
/* If FROM inherits from some other faces, merge their attributes into
@@ -2082,7 +2087,7 @@ merge_face_vectors (struct window *w, struct frame *f,
else if (UNSPECIFIEDP (from[attr_filter])) /* FROM don't specify filter
*/
{
Lisp_Object tmp[LFACE_VECTOR_SIZE];
- memcpy (tmp, to, LFACE_VECTOR_SIZE * sizeof *tmp);
+ memcpy (tmp, to, LFACE_VECTOR_SIZE * sizeof(*tmp));
merge_face_ref (w, f, from[LFACE_INHERIT_INDEX],
tmp, false, named_merge_points, attr_filter);
@@ -2177,7 +2182,8 @@ merge_named_face (struct window *w,
&& !UNSPECIFIEDP(from[attr_filter]))
|| (!NILP(from[attr_filter]) /* Filter, unspecified, but
inherited. */
&& UNSPECIFIEDP(from[attr_filter])
- && !NILP (from[LFACE_INHERIT_INDEX]))))
+ && !NILP (from[LFACE_INHERIT_INDEX])
+ && !UNSPECIFIEDP (from[LFACE_INHERIT_INDEX]))))
merge_face_vectors (w, f, from, to, named_merge_points, attr_filter);
return ok;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 8232325: Handle case where a face's :extend attribute is unspecified (Bug#37774),
Martin Rudalics <=