/* True means don't display bold text if a face's foreground
and background colors are the inverse of the default colors of the
/* True means don't display bold text if a face's foreground
and background colors are the inverse of the default colors of the
/* If display has an immutable color map, freeing colors is not
necessary and some servers don't allow it. So don't do it. */
/* If display has an immutable color map, freeing colors is not
necessary and some servers don't allow it. So don't do it. */
unsigned long *pixels, int npixels)
{
struct x_display_info *dpyinfo = x_display_info_for_display (dpy);
unsigned long *pixels, int npixels)
{
struct x_display_info *dpyinfo = x_display_info_for_display (dpy);
/* If display has an immutable color map, freeing colors is not
necessary and some servers don't allow it. So don't do it. */
/* If display has an immutable color map, freeing colors is not
necessary and some servers don't allow it. So don't do it. */
/* Clear face caches, and recompute basic faces for frame F. Call
this after changing frame parameters on which those faces depend,
or when realized faces have been freed due to changing attributes
/* Clear face caches, and recompute basic faces for frame F. Call
this after changing frame parameters on which those faces depend,
or when realized faces have been freed due to changing attributes
DEFUN ("clear-face-cache", Fclear_face_cache, Sclear_face_cache, 0, 1, 0,
doc: /* Clear face caches on all frames.
Optional THOROUGHLY non-nil means try to free unused fonts, too. */)
(Lisp_Object thoroughly)
{
clear_face_cache (!NILP (thoroughly));
DEFUN ("clear-face-cache", Fclear_face_cache, Sclear_face_cache, 0, 1, 0,
doc: /* Clear face caches on all frames.
Optional THOROUGHLY non-nil means try to free unused fonts, too. */)
(Lisp_Object thoroughly)
{
clear_face_cache (!NILP (thoroughly));
DEFUN ("bitmap-spec-p", Fbitmap_spec_p, Sbitmap_spec_p, 1, 1, 0,
doc: /* Value is non-nil if OBJECT is a valid bitmap specification.
A bitmap specification is either a string, a file name, or a list
DEFUN ("bitmap-spec-p", Fbitmap_spec_p, Sbitmap_spec_p, 1, 1, 0,
doc: /* Value is non-nil if OBJECT is a valid bitmap specification.
A bitmap specification is either a string, a file name, or a list
HEIGHT is its height, and DATA is a string containing the bits of
the pixmap. Bits are stored row by row, each row occupies
HEIGHT is its height, and DATA is a string containing the bits of
the pixmap. Bits are stored row by row, each row occupies
to the values in an existing cell. */
if (!defined_color (f, SSDATA (name), color, true))
{
to the values in an existing cell. */
if (!defined_color (f, SSDATA (name), color, true))
{
|| SYMBOLP (attrs[LFACE_SWIDTH_INDEX]));
eassert (UNSPECIFIEDP (attrs[LFACE_HEIGHT_INDEX])
|| IGNORE_DEFFACE_P (attrs[LFACE_HEIGHT_INDEX])
|| SYMBOLP (attrs[LFACE_SWIDTH_INDEX]));
eassert (UNSPECIFIEDP (attrs[LFACE_HEIGHT_INDEX])
|| IGNORE_DEFFACE_P (attrs[LFACE_HEIGHT_INDEX])
|| FUNCTIONP (attrs[LFACE_HEIGHT_INDEX]));
eassert (UNSPECIFIEDP (attrs[LFACE_WEIGHT_INDEX])
|| IGNORE_DEFFACE_P (attrs[LFACE_WEIGHT_INDEX])
|| FUNCTIONP (attrs[LFACE_HEIGHT_INDEX]));
eassert (UNSPECIFIEDP (attrs[LFACE_WEIGHT_INDEX])
|| IGNORE_DEFFACE_P (attrs[LFACE_WEIGHT_INDEX])
Lisp_Object from[LFACE_VECTOR_SIZE];
bool ok = get_lface_attributes (f, face_name, from, false,
named_merge_points);
if (ok)
Lisp_Object from[LFACE_VECTOR_SIZE];
bool ok = get_lface_attributes (f, face_name, from, false,
named_merge_points);
if (ok)
- {
- GCPRO1 (named_merge_point.face_name);
- merge_face_vectors (f, from, to, named_merge_points);
- UNGCPRO;
- }
+ merge_face_vectors (f, from, to, named_merge_points);
/* FACE_REF ought to be a face name. */
ok = merge_named_face (f, face_ref, to, named_merge_points);
if (!ok && err_msgs)
/* FACE_REF ought to be a face name. */
ok = merge_named_face (f, face_ref, to, named_merge_points);
if (!ok && err_msgs)
/* Changing a named face means that all realized faces depending on
that face are invalid. Since we cannot tell which realized faces
depend on the face, make sure they are all removed. This is done
/* Changing a named face means that all realized faces depending on
that face are invalid. Since we cannot tell which realized faces
depend on the face, make sure they are all removed. This is done
(Lisp_Object from, Lisp_Object to, Lisp_Object frame, Lisp_Object new_frame)
{
Lisp_Object lface, copy;
(Lisp_Object from, Lisp_Object to, Lisp_Object frame, Lisp_Object new_frame)
{
Lisp_Object lface, copy;
strings etc. because 20.2 didn't do it either. */
lface = lface_from_face_name (NULL, from, true);
copy = Finternal_make_lisp_face (to, Qnil);
strings etc. because 20.2 didn't do it either. */
lface = lface_from_face_name (NULL, from, true);
copy = Finternal_make_lisp_face (to, Qnil);
CHECK_LIVE_FRAME (new_frame);
lface = lface_from_face_name (XFRAME (frame), from, true);
copy = Finternal_make_lisp_face (to, new_frame);
CHECK_LIVE_FRAME (new_frame);
lface = lface_from_face_name (XFRAME (frame), from, true);
copy = Finternal_make_lisp_face (to, new_frame);
}
vcopy (copy, 0, XVECTOR (lface)->contents, LFACE_VECTOR_SIZE);
}
vcopy (copy, 0, XVECTOR (lface)->contents, LFACE_VECTOR_SIZE);
/* Changing a named face means that all realized faces depending on
that face are invalid. Since we cannot tell which realized faces
depend on the face, make sure they are all removed. This is done
/* Changing a named face means that all realized faces depending on
that face are invalid. Since we cannot tell which realized faces
depend on the face, make sure they are all removed. This is done
/* Set one of enum font_property_index (> 0) if ATTR is one of
font-related attributes other than QCfont and QCfontset. */
enum font_property_index prop_index = 0;
/* Set one of enum font_property_index (> 0) if ATTR is one of
font-related attributes other than QCfont and QCfontset. */
enum font_property_index prop_index = 0;
lface = lface_from_face_name (NULL, face, true);
/* When updating face-new-frame-defaults, we put :ignore-defface
lface = lface_from_face_name (NULL, face, true);
/* When updating face-new-frame-defaults, we put :ignore-defface
else if (EQ (attr, QCfont))
{
#ifdef HAVE_WINDOW_SYSTEM
else if (EQ (attr, QCfont))
{
#ifdef HAVE_WINDOW_SYSTEM
/* FIXME:
If frame is t, and selected frame is a tty frame, the font
can't be realized. An improvement would be to loop over frames
for a non-tty frame and use that. See discussion in Bug#18573.
For a daemon, frame may be an initial frame (Bug#18869). */
/* FIXME:
If frame is t, and selected frame is a tty frame, the font
can't be realized. An improvement would be to loop over frames
for a non-tty frame and use that. See discussion in Bug#18573.
For a daemon, frame may be an initial frame (Bug#18869). */
- set_lface_from_font (f, lface, value, true);
+ set_lface_from_font (f1, lface, value, true);
+ f1->face_change = 1;
else if (EQ (attr, QCfontset))
{
#ifdef HAVE_WINDOW_SYSTEM
else if (EQ (attr, QCfontset))
{
#ifdef HAVE_WINDOW_SYSTEM
/* Changing a named face means that all realized faces depending on
that face are invalid. Since we cannot tell which realized faces
depend on the face, make sure they are all removed. This is done
/* Changing a named face means that all realized faces depending on
that face are invalid. Since we cannot tell which realized faces
depend on the face, make sure they are all removed. This is done
if (!EQ (frame, Qt)
&& NILP (Fget (face, Qface_no_inherit))
&& NILP (Fequal (old_value, value)))
{
if (!EQ (frame, Qt)
&& NILP (Fget (face, Qface_no_inherit))
&& NILP (Fequal (old_value, value)))
{
/* Changing a named face means that all realized faces depending on
that face are invalid. Since we cannot tell which realized faces
depend on the face, make sure they are all removed. This is done
/* Changing a named face means that all realized faces depending on
that face are invalid. Since we cannot tell which realized faces
depend on the face, make sure they are all removed. This is done
c->used = 0;
size = FACE_CACHE_BUCKETS_SIZE * sizeof *c->buckets;
memset (c->buckets, 0, size);
c->used = 0;
size = FACE_CACHE_BUCKETS_SIZE * sizeof *c->buckets;
memset (c->buckets, 0, size);
Lisp_Object rest;
FOR_EACH_FRAME (rest, frame)
free_realized_faces (FRAME_FACE_CACHE (XFRAME (frame)));
Lisp_Object rest;
FOR_EACH_FRAME (rest, frame)
free_realized_faces (FRAME_FACE_CACHE (XFRAME (frame)));
that a face containing all the attributes in ATTRS, when merged with the
default face for display, can be represented in a way that's
that a face containing all the attributes in ATTRS, when merged with the
default face for display, can be represented in a way that's
- \(1) different in appearance than the default face, and
- \(2) `close in spirit' to what the attributes specify, if not exact. */
+ (1) different in appearance than the default face, and
+ (2) `close in spirit' to what the attributes specify, if not exact. */
that a face containing all the attributes in ATTRS, when merged
with the default face for display, can be represented in a way that's
that a face containing all the attributes in ATTRS, when merged
with the default face for display, can be represented in a way that's
- \(1) different in appearance than the default face, and
- \(2) `close in spirit' to what the attributes specify, if not exact.
+ (1) different in appearance than the default face, and
+ (2) `close in spirit' to what the attributes specify, if not exact.
Point (2) implies that a `:weight black' attribute will be satisfied
by any terminal that can display bold, and a `:foreground "yellow"' as
Point (2) implies that a `:weight black' attribute will be satisfied
by any terminal that can display bold, and a `:foreground "yellow"' as
that a face containing all the attributes in ATTRIBUTES, when merged
with the default face for display, can be represented in a way that's
that a face containing all the attributes in ATTRIBUTES, when merged
with the default face for display, can be represented in a way that's
- \(1) different in appearance than the default face, and
- \(2) `close in spirit' to what the attributes specify, if not exact.
+ (1) different in appearance than the default face, and
+ (2) `close in spirit' to what the attributes specify, if not exact.
Point (2) implies that a `:weight black' attribute will be satisfied by
any display that can display bold, and a `:foreground \"yellow\"' as long
Point (2) implies that a `:weight black' attribute will be satisfied by
any display that can display bold, and a `:foreground \"yellow\"' as long
/* Block input here so that we won't be surprised by an X expose
event, for instance, without having the faces set up. */
block_input ();
/* Block input here so that we won't be surprised by an X expose
event, for instance, without having the faces set up. */
block_input ();
- && (def = assq_no_quit (color, call1 (Qtty_color_alist, frame)),
+ && (def = assoc_no_quit (color, call1 (Qtty_color_alist, frame)),
/* Names of basic faces. */
DEFSYM (Qdefault, "default");
DEFSYM (Qtool_bar, "tool-bar");
/* Names of basic faces. */
DEFSYM (Qdefault, "default");
DEFSYM (Qtool_bar, "tool-bar");
DEFSYM (Qfringe, "fringe");
DEFSYM (Qheader_line, "header-line");
DEFSYM (Qscroll_bar, "scroll-bar");
DEFSYM (Qfringe, "fringe");
DEFSYM (Qheader_line, "header-line");
DEFSYM (Qscroll_bar, "scroll-bar");
/* The name of the function used to compute colors on TTYs. */
DEFSYM (Qtty_color_alist, "tty-color-alist");
/* The name of the function used to compute colors on TTYs. */
DEFSYM (Qtty_color_alist, "tty-color-alist");
- /* Allowed scalable fonts. A value of nil means don't allow any
- scalable fonts. A value of t means allow the use of any scalable
- font. Otherwise, value must be a list of regular expressions. A
- font may be scaled if its name matches a regular expression in the
- list. */
- DEFSYM (Qscalable_fonts_allowed, "scalable-fonts-allowed");
-
Vparam_value_alist = list1 (Fcons (Qnil, Qnil));
staticpro (&Vparam_value_alist);
Vface_alternative_font_family_alist = Qnil;
Vparam_value_alist = list1 (Fcons (Qnil, Qnil));
staticpro (&Vparam_value_alist);
Vface_alternative_font_family_alist = Qnil;
only in that buffer. For instance, the mode my-mode could define a
face `my-mode-default', and then in the mode setup function, do:
only in that buffer. For instance, the mode my-mode could define a
face `my-mode-default', and then in the mode setup function, do:
Because Emacs normally only redraws screen areas when the underlying
buffer contents change, you may need to call `redraw-display' after
Because Emacs normally only redraws screen areas when the underlying
buffer contents change, you may need to call `redraw-display' after
Each element is a cons (FONT-PATTERN . RESCALE-RATIO), where
FONT-PATTERN is a font-spec or a regular expression matching a font name, and
RESCALE-RATIO is a floating point number to specify how much larger
Each element is a cons (FONT-PATTERN . RESCALE-RATIO), where
FONT-PATTERN is a font-spec or a regular expression matching a font name, and
RESCALE-RATIO is a floating point number to specify how much larger
a font of 10 point, we actually use a font of 10 * RESCALE-RATIO point. */);
Vface_font_rescale_alist = Qnil;
a font of 10 point, we actually use a font of 10 * RESCALE-RATIO point. */);
Vface_font_rescale_alist = Qnil;