summaryrefslogtreecommitdiff
path: root/src/xfaces.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xfaces.c')
-rw-r--r--src/xfaces.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/xfaces.c b/src/xfaces.c
index 8064d47c947..6a279f87192 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -3165,14 +3165,15 @@ FRAME 0 means change the face on all frames, and change the default
*/
valid_p = true;
- while (!NILP (CAR_SAFE(list)))
+ while (!NILP (CAR_SAFE (list)))
{
key = CAR_SAFE (list);
list = CDR_SAFE (list);
val = CAR_SAFE (list);
list = CDR_SAFE (list);
- if (NILP (key) || NILP (val))
+ if (NILP (key) || (NILP (val)
+ && !EQ (key, QCposition)))
{
valid_p = false;
break;
@@ -6423,8 +6424,12 @@ face_at_buffer_position (struct window *w, ptrdiff_t pos,
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));
+ {
+ if (FRAME_FACE_CACHE (f)->used == 0)
+ recompute_basic_faces (f);
+ default_face = FACE_FROM_ID (f,
+ lookup_basic_face (w, f, DEFAULT_FACE_ID));
+ }
}
/* Optimize common cases where we can use the default face. */