Some stylistic corrections in src/xdisp.c and src/xfaces.c.
indicates its extent by highlighting the text within it, using the
@code{region} face (@pxref{Face Customization}).
+This is one of the few faces that has the @code{:extend t} attribute
+by default, which implies that the same face is used to highlight the
+text and space between end of line and the window border. To
+highlight only the text you could set this attribute to @code{nil}.
+
@cindex deactivating the mark
After certain non-motion commands, including any command that
changes the text in the buffer, Emacs automatically @dfn{deactivates}
never merges @code{:inherit} attributes. If a list of faces is used,
attributes from faces earlier in the list override those from later
faces.
+
+@item :extend
+Whether or not this face will be extended until the end of the window.
+The value should be @code{t} to extend until end of the window using
+this face or @code{nil} fill the space between the end of the line and
+the end of the window with the default face. When a face is conformed
+by merging multiple other faces; only those with @code{:extend t} will
+be merged to conform a new face to extend until end of window. By
+default only @code{region} and @code{hl-line} have this attribute set
+to @code{t}.
+
@end table
@defun font-family-list &optional frame
@deffn Command invert-face face &optional frame
This swaps the foreground and background colors of face @var{face}.
+@end deffn
+
+@deffn Command set-face-extend face extend &optional frame
+This sets the @code{:extend} attribute of @var{face} to
+@var{extend}.
@end deffn
The following functions examine the attributes of a face. They
a non-@code{nil} @code{:inverse-video} attribute.
@end defun
+@defun face-extend-p face &optional frame
+This function returns non-@code{nil} if face @var{face} specifies
+a non-@code{nil} @code{:extend} attribute.
+@end defun
+
+
@node Displaying Faces
@subsection Displaying Faces
@cindex displaying faces
const int local_default_face_id =
lookup_basic_face (it->w, it->f, DEFAULT_FACE_ID);
struct face* default_face =
- FACE_FROM_ID (it->f, local_default_face_id);
+ FACE_FROM_ID_OR_NULL (it->f, local_default_face_id);
#ifdef HAVE_WINDOW_SYSTEM
if (FRAME_WINDOW_P (it->f))
g->ascent = it->max_ascent;
g->descent = it->max_descent;
}
-#endif // HAVE_WINDOW_SYSTEM
+#endif /* HAVE_WINDOW_SYSTEM */
it->override_ascent = -1;
it->constrain_row_ascent_descent_p = false;
it->current_x = saved_x;
}
}
- /* Restore the face after the indicator was generated. */
-
/* If there is space after the indicator generate an
extra empty glyph to restore the face. Issue was
observed in X systems. */
of ERR_MSGS). Use NAMED_MERGE_POINTS to detect loops in face
inheritance or list structure; it may be 0 for most callers.
- attr_filter is the index of a parameter that conditions the merging
+ ATTR_FILTER is the index of a parameter that conditions the merging
for named faces (case 1) to only the face_ref where
lface[merge_face_ref] is non-nil. To merge unconditionally set this
value to 0.
which a different face is needed, as far as text properties and
overlays are concerned. W is a window displaying current_buffer.
- attr_filter is passed merge_face_ref.
+ ATTR_FILTER is passed merge_face_ref.
REGION_BEG, REGION_END delimit the region, so it can be
highlighted.
}
/* Optimize common cases where we can use the default face. */
- if (noverlays == 0 && NILP (prop))
+ if (noverlays == 0
+ && NILP (prop))
{
SAFE_FREE ();
return default_face->id;