/* Return the display face-id of the basic face whose canonical face-id
is FACE_ID. The return value will usually simply be FACE_ID, unless that
- basic face has bee remapped via Vface_remapping_alist. This function is
+ basic face has been remapped via Vface_remapping_alist. This function is
conservative: if something goes wrong, it will simply return FACE_ID
rather than signal an error. Window W, if non-NULL, is used to filter
face specifications for remapping. */
int face_id;
if (base_face_id >= 0)
- {
- face_id = base_face_id;
- /* Make sure the base face ID is usable: if someone freed the
- cached faces since we've looked up the base face, we need
- to look it up again. */
- if (!FACE_FROM_ID_OR_NULL (f, face_id))
- face_id = lookup_basic_face (w, f, DEFAULT_FACE_ID);
- }
+ face_id = base_face_id;
else if (NILP (Vface_remapping_alist))
face_id = DEFAULT_FACE_ID;
else
face_id = lookup_basic_face (w, f, DEFAULT_FACE_ID);
default_face = FACE_FROM_ID_OR_NULL (f, face_id);
+ /* Make sure the default face ID is usable: if someone freed the
+ cached faces since we've looked up these faces, we need to look
+ them up again. */
if (!default_face)
default_face = FACE_FROM_ID (f,
lookup_basic_face (w, f, DEFAULT_FACE_ID));
else
*endptr = -1;
- base_face = FACE_FROM_ID (f, base_face_id);
+ base_face = FACE_FROM_ID_OR_NULL (f, base_face_id);
+ if (!base_face)
+ base_face = FACE_FROM_ID (f, lookup_basic_face (w, f, DEFAULT_FACE_ID));
/* Optimize the default case that there is no face property. */
if (NILP (prop)