diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 08c6927052c..bfc48e36a99 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -4243,11 +4243,25 @@ face_at_pos (const struct it *it, enum lface_attribute_index attr_filter) | |||
| 4243 | the display string do. This sounds like a design bug, | 4243 | the display string do. This sounds like a design bug, |
| 4244 | but Emacs always did that since v21.1, so changing that | 4244 | but Emacs always did that since v21.1, so changing that |
| 4245 | might be a big deal. */ | 4245 | might be a big deal. */ |
| 4246 | base_face_id = it->string_from_prefix_prop_p | 4246 | bool use_default = (it->string_from_prefix_prop_p != 0); |
| 4247 | ? (!NILP (Vface_remapping_alist) | 4247 | if (!use_default) |
| 4248 | ? lookup_basic_face (it->w, it->f, DEFAULT_FACE_ID) | 4248 | { |
| 4249 | : DEFAULT_FACE_ID) | 4249 | base_face_id = underlying_face_id (it); |
| 4250 | : underlying_face_id (it); | 4250 | /* Reject the underlying face, if that face is different |
| 4251 | from the iterator face, and we filter by attr_filter, | ||
| 4252 | and that face's value of the filter attribute is nil | ||
| 4253 | or unspecified; use the default face instead. */ | ||
| 4254 | struct face *bf = FACE_FROM_ID_OR_NULL (it->f, base_face_id); | ||
| 4255 | if (base_face_id != it->base_face_id | ||
| 4256 | && attr_filter > 0 | ||
| 4257 | && (NILP (bf->lface[attr_filter]) | ||
| 4258 | || EQ (bf->lface[attr_filter], Qunspecified))) | ||
| 4259 | use_default = true; | ||
| 4260 | } | ||
| 4261 | if (use_default) | ||
| 4262 | base_face_id = (!NILP (Vface_remapping_alist) | ||
| 4263 | ? lookup_basic_face (it->w, it->f, DEFAULT_FACE_ID) | ||
| 4264 | : DEFAULT_FACE_ID); | ||
| 4251 | } | 4265 | } |
| 4252 | 4266 | ||
| 4253 | return face_at_string_position (it->w, | 4267 | return face_at_string_position (it->w, |