aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJimmy Aguilar Mena2019-11-08 09:31:33 +0100
committerMartin Rudalics2019-11-08 09:31:33 +0100
commit82323253378c310c71cfea393d228321d1fc51f4 (patch)
tree7663b8dc64ba9a5fd4cd8c4b6504c2c7baf30ca7 /src
parenta070bd1c8b5213ad469d41dd80d392f924644aed (diff)
downloademacs-82323253378c310c71cfea393d228321d1fc51f4.tar.gz
emacs-82323253378c310c71cfea393d228321d1fc51f4.zip
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).
Diffstat (limited to 'src')
-rw-r--r--src/xfaces.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/xfaces.c b/src/xfaces.c
index 3806fa90e23..67fa9e24b86 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -2062,8 +2062,13 @@ merge_face_vectors (struct window *w, struct frame *f,
2062 2062
2063 eassert (attr_filter < LFACE_VECTOR_SIZE); 2063 eassert (attr_filter < LFACE_VECTOR_SIZE);
2064 2064
2065 /* When FROM sets attr_filter to nil explicitly we don't merge it. */ 2065 /* When FROM sets attr_filter explicitly to nil or unspecified
2066 if (attr_filter > 0 && NILP(from[attr_filter])) 2066 without inheriting don't merge it. */
2067 if (attr_filter > 0
2068 && (NILP(from[attr_filter])
2069 || (UNSPECIFIEDP(from[attr_filter])
2070 && (NILP (from[LFACE_INHERIT_INDEX])
2071 || UNSPECIFIEDP (from[LFACE_INHERIT_INDEX])))))
2067 return; 2072 return;
2068 2073
2069 /* If FROM inherits from some other faces, merge their attributes into 2074 /* If FROM inherits from some other faces, merge their attributes into
@@ -2082,7 +2087,7 @@ merge_face_vectors (struct window *w, struct frame *f,
2082 else if (UNSPECIFIEDP (from[attr_filter])) /* FROM don't specify filter */ 2087 else if (UNSPECIFIEDP (from[attr_filter])) /* FROM don't specify filter */
2083 { 2088 {
2084 Lisp_Object tmp[LFACE_VECTOR_SIZE]; 2089 Lisp_Object tmp[LFACE_VECTOR_SIZE];
2085 memcpy (tmp, to, LFACE_VECTOR_SIZE * sizeof *tmp); 2090 memcpy (tmp, to, LFACE_VECTOR_SIZE * sizeof(*tmp));
2086 2091
2087 merge_face_ref (w, f, from[LFACE_INHERIT_INDEX], 2092 merge_face_ref (w, f, from[LFACE_INHERIT_INDEX],
2088 tmp, false, named_merge_points, attr_filter); 2093 tmp, false, named_merge_points, attr_filter);
@@ -2177,7 +2182,8 @@ merge_named_face (struct window *w,
2177 && !UNSPECIFIEDP(from[attr_filter])) 2182 && !UNSPECIFIEDP(from[attr_filter]))
2178 || (!NILP(from[attr_filter]) /* Filter, unspecified, but inherited. */ 2183 || (!NILP(from[attr_filter]) /* Filter, unspecified, but inherited. */
2179 && UNSPECIFIEDP(from[attr_filter]) 2184 && UNSPECIFIEDP(from[attr_filter])
2180 && !NILP (from[LFACE_INHERIT_INDEX])))) 2185 && !NILP (from[LFACE_INHERIT_INDEX])
2186 && !UNSPECIFIEDP (from[LFACE_INHERIT_INDEX]))))
2181 merge_face_vectors (w, f, from, to, named_merge_points, attr_filter); 2187 merge_face_vectors (w, f, from, to, named_merge_points, attr_filter);
2182 2188
2183 return ok; 2189 return ok;