From 67d23e016655c1e79e1f9ba43c22d4fb67a8057e Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 20 Nov 2005 22:35:48 +0000 Subject: [PATCH] (merge_face_vectors): Don't do :ignore-defface overwriting here. (Finternal_merge_in_global_face): Do it here. --- src/ChangeLog | 2 ++ src/xfaces.c | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index e70e00e2f57..addb672d10d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,6 +4,8 @@ :ignore-defface for new frame defaults when `unspecified' is supplied. (Finternal_get_lisp_face_attribute): Hide :ignore-defface. + (merge_face_vectors): Don't do :ignore-defface overwriting here. + (Finternal_merge_in_global_face): Do it here. 2005-11-20 Juri Linkov diff --git a/src/xfaces.c b/src/xfaces.c index 8729441925a..7923686eb50 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -3576,8 +3576,6 @@ merge_face_vectors (f, from, to, named_merge_points) { if (i == LFACE_HEIGHT_INDEX && !INTEGERP (from[i])) to[i] = merge_face_heights (from[i], to[i], to[i]); - else if (IGNORE_DEFFACE_P (from[i])) - to[i] = Qunspecified; else to[i] = from[i]; } @@ -4056,8 +4054,15 @@ FRAME 0 means change the face on all frames, and change the default if (EQ (frame, Qt)) { lface = lface_from_face_name (NULL, face, 1); + + /* When updating face-new-frame-defaults, we put :ignore-defface + where the caller wants `unspecified'. This forces the frame + defaults to ignore the defface value. Otherwise, the defface + will take effect, which is generally not what is intended. + The value of that attribute will be inherited from some other + face during face merging. See internal_merge_in_global_face. */ if (UNSPECIFIEDP (value)) - value = Qignore_defface; + value = Qignore_defface; } else { @@ -4969,7 +4974,10 @@ Default face attributes override any local face attributes. */) gvec = XVECTOR (global_lface)->contents; for (i = 1; i < LFACE_VECTOR_SIZE; ++i) if (! UNSPECIFIEDP (gvec[i])) - lvec[i] = gvec[i]; + if (IGNORE_DEFFACE_P (gvec[i])) + lvec[i] = Qunspecified; + else + lvec[i] = gvec[i]; return Qnil; } -- 2.39.2