changeset 96551:be8753b44809

(Finternal_merge_in_global_face): Save merged attributes for the default face back into the face vector.
author Chong Yidong <cyd@stupidchicken.com>
date Tue, 08 Jul 2008 17:27:28 +0000
parents 51032062ce1e
children 03b926c8993f
files src/xfaces.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfaces.c	Tue Jul 08 17:27:19 2008 +0000
+++ b/src/xfaces.c	Tue Jul 08 17:27:28 2008 +0000
@@ -3966,7 +3966,7 @@
     else if (! UNSPECIFIEDP (gvec[i]))
       lvec[i] = gvec[i];
 
-  /* If the default face was changed, realize it again, and update the
+  /* If the default face was changed, update the face cache and the
      `font' frame parameter.  */
   if (EQ (face, Qdefault))
     {
@@ -3977,9 +3977,12 @@
       /* This can be NULL (e.g., in batch mode).  */
       if (oldface)
 	{
+	  /* Ensure that the face vector is fully specified by merging
+	     the previously-cached vector.  */
 	  bcopy (oldface->lface, attrs, sizeof attrs);
 	  merge_face_vectors (f, lvec, attrs, 0);
-	  newface = realize_face (c, attrs, DEFAULT_FACE_ID);
+	  bcopy (attrs, lvec, sizeof attrs);
+	  newface = realize_face (c, lvec, DEFAULT_FACE_ID);
 
 	  if ((! UNSPECIFIEDP (gvec[LFACE_FAMILY_INDEX])
 	       || ! UNSPECIFIEDP (gvec[LFACE_FOUNDRY_INDEX])