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
c897048c
Commit
c897048c
authored
Jul 28, 2011
by
Chong Yidong
Browse files
Backport 2010-07-03T14:42:02Z!eliz@gnu.org from trunk
parent
ea180610
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
31 deletions
+39
-31
src/ChangeLog
src/ChangeLog
+6
-0
src/xfaces.c
src/xfaces.c
+33
-31
No files found.
src/ChangeLog
View file @
c897048c
2011-07-28 Eli Zaretskii <eliz@gnu.org>
* xfaces.c (update_face_from_frame_parameter): Move out of
HAVE_WINDOW_SYSTEM portion. Condition window-system only parts
with HAVE_WINDOW_SYSTEM.
2011-07-26 Andreas Schwab <schwab@linux-m68k.org>
* fontset.c (fontset_get_font_group): Add proper type checks.
...
...
src/xfaces.c
View file @
c897048c
...
...
@@ -3490,37 +3490,6 @@ FRAME 0 means change the face on all frames, and change the default
}
#ifdef HAVE_WINDOW_SYSTEM
/* Set the `font' frame parameter of FRAME determined from the
font-object set in `default' face attributes LFACE. */
static void
set_font_frame_param (frame, lface)
Lisp_Object frame, lface;
{
struct frame *f = XFRAME (frame);
Lisp_Object font;
if (FRAME_WINDOW_P (f)
/* Don't do anything if the font is `unspecified'. This can
happen during frame creation. */
&& (font = LFACE_FONT (lface),
! UNSPECIFIEDP (font)))
{
if (FONT_SPEC_P (font))
{
font = font_load_for_lface (f, XVECTOR (lface)->contents, font);
if (NILP (font))
return;
LFACE_FONT (lface) = font;
}
f->default_face_done_p = 0;
Fmodify_frame_parameters (frame, Fcons (Fcons (Qfont, font), Qnil));
}
}
/* Update the corresponding face when frame parameter PARAM on frame F
has been assigned the value NEW_VALUE. */
...
...
@@ -3562,6 +3531,7 @@ update_face_from_frame_parameter (f, param, new_value)
? new_value : Qunspecified);
realize_basic_faces (f);
}
#ifdef HAVE_WINDOW_SYSTEM
else if (EQ (param, Qborder_color))
{
face = Qborder;
...
...
@@ -3583,6 +3553,7 @@ update_face_from_frame_parameter (f, param, new_value)
LFACE_BACKGROUND (lface) = (STRINGP (new_value)
? new_value : Qunspecified);
}
#endif
/* Changing a named face means that all realized faces depending on
that face are invalid. Since we cannot tell which realized faces
...
...
@@ -3598,6 +3569,37 @@ update_face_from_frame_parameter (f, param, new_value)
}
#ifdef HAVE_WINDOW_SYSTEM
/* Set the `font' frame parameter of FRAME determined from the
font-object set in `default' face attributes LFACE. */
static void
set_font_frame_param (frame, lface)
Lisp_Object frame, lface;
{
struct frame *f = XFRAME (frame);
Lisp_Object font;
if (FRAME_WINDOW_P (f)
/* Don't do anything if the font is `unspecified'. This can
happen during frame creation. */
&& (font = LFACE_FONT (lface),
! UNSPECIFIEDP (font)))
{
if (FONT_SPEC_P (font))
{
font = font_load_for_lface (f, XVECTOR (lface)->contents, font);
if (NILP (font))
return;
LFACE_FONT (lface) = font;
}
f->default_face_done_p = 0;
Fmodify_frame_parameters (frame, Fcons (Fcons (Qfont, font), Qnil));
}
}
/* Get the value of X resource RESOURCE, class CLASS for the display
of frame FRAME. This is here because ordinary `x-get-resource'
doesn't take a frame argument. */
...
...
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