Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
0421a7a7
Commit
0421a7a7
authored
Jul 05, 2008
by
Chong Yidong
Browse files
(Finternal_merge_in_global_face): Don't realize default face if it
didn't already exist.
parent
0a143d3a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
15 deletions
+19
-15
src/xfaces.c
src/xfaces.c
+19
-15
No files found.
src/xfaces.c
View file @
0421a7a7
...
...
@@ -3971,22 +3971,26 @@ Default face attributes override any local face attributes. */)
struct face *newface, *oldface = FACE_FROM_ID (f, DEFAULT_FACE_ID);
Lisp_Object attrs[LFACE_VECTOR_SIZE];
bcopy (oldface->lface, attrs, sizeof attrs);
merge_face_vectors (f, lvec, attrs, 0);
newface = realize_face (c, attrs, DEFAULT_FACE_ID);
if ((! UNSPECIFIEDP (gvec[LFACE_FAMILY_INDEX])
|| ! UNSPECIFIEDP (gvec[LFACE_FOUNDRY_INDEX])
|| ! UNSPECIFIEDP (gvec[LFACE_HEIGHT_INDEX])
|| ! UNSPECIFIEDP (gvec[LFACE_WEIGHT_INDEX])
|| ! UNSPECIFIEDP (gvec[LFACE_SLANT_INDEX])
|| ! UNSPECIFIEDP (gvec[LFACE_SWIDTH_INDEX])
|| ! UNSPECIFIEDP (gvec[LFACE_FONT_INDEX]))
&& newface->font)
/* This can be NULL (e.g., in batch mode). */
if (oldface)
{
Lisp_Object name = newface->font->props[FONT_NAME_INDEX];
Fmodify_frame_parameters (frame, Fcons (Fcons (Qfont, name),
Qnil));
bcopy (oldface->lface, attrs, sizeof attrs);
merge_face_vectors (f, lvec, attrs, 0);
newface = realize_face (c, attrs, DEFAULT_FACE_ID);
if ((! UNSPECIFIEDP (gvec[LFACE_FAMILY_INDEX])
|| ! UNSPECIFIEDP (gvec[LFACE_FOUNDRY_INDEX])
|| ! UNSPECIFIEDP (gvec[LFACE_HEIGHT_INDEX])
|| ! UNSPECIFIEDP (gvec[LFACE_WEIGHT_INDEX])
|| ! UNSPECIFIEDP (gvec[LFACE_SLANT_INDEX])
|| ! UNSPECIFIEDP (gvec[LFACE_SWIDTH_INDEX])
|| ! UNSPECIFIEDP (gvec[LFACE_FONT_INDEX]))
&& newface->font)
{
Lisp_Object name = newface->font->props[FONT_NAME_INDEX];
Fmodify_frame_parameters (frame, Fcons (Fcons (Qfont, name),
Qnil));
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment