# HG changeset patch # User Chong Yidong # Date 1132526148 0 # Node ID 3ce17ff4a61f30789a1af93c59d2b683233e289b # Parent c6ae377fa1f041cc8ff865c38c52dcfecdd3bf60 (merge_face_vectors): Don't do :ignore-defface overwriting here. (Finternal_merge_in_global_face): Do it here. diff -r c6ae377fa1f0 -r 3ce17ff4a61f src/ChangeLog --- a/src/ChangeLog Sun Nov 20 19:21:20 2005 +0000 +++ b/src/ChangeLog Sun Nov 20 22:35:48 2005 +0000 @@ -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 -r c6ae377fa1f0 -r 3ce17ff4a61f src/xfaces.c --- a/src/xfaces.c Sun Nov 20 19:21:20 2005 +0000 +++ b/src/xfaces.c Sun Nov 20 22:35:48 2005 +0000 @@ -3576,8 +3576,6 @@ { 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 @@ 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 @@ 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; }