[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] feature/extend_face_id 1112779 15/19: Document new :extend
From: |
Jimmy Aguilar Mena |
Subject: |
[Emacs-diffs] feature/extend_face_id 1112779 15/19: Document new :extend face attribute in manuals. |
Date: |
Sun, 13 Oct 2019 18:07:35 -0400 (EDT) |
branch: feature/extend_face_id
commit 1112779cbaaab08efe8eb3cd0ba162d8bf59c594
Author: Jimmy Aguilar Mena <address@hidden>
Commit: Jimmy Aguilar Mena <address@hidden>
Document new :extend face attribute in manuals.
Some stylistic corrections in src/xdisp.c and src/xfaces.c.
---
doc/emacs/mark.texi | 5 +++++
doc/lispref/display.texi | 22 ++++++++++++++++++++++
src/xdisp.c | 6 ++----
src/xfaces.c | 7 ++++---
4 files changed, 33 insertions(+), 7 deletions(-)
diff --git a/doc/emacs/mark.texi b/doc/emacs/mark.texi
index bbeb4cb..f012d72 100644
--- a/doc/emacs/mark.texi
+++ b/doc/emacs/mark.texi
@@ -23,6 +23,11 @@ When the mark is active, we say also that the region is
active; Emacs
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}
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 61bd4ce..1678d32 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -2482,6 +2482,17 @@ faces (@pxref{Displaying Faces}). If the face to
inherit from is
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
@@ -2842,6 +2853,11 @@ This sets the @code{:inverse-video} attribute of
@var{face} to
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
mostly provide compatibility with old versions of Emacs. If you don't
specify @var{frame}, they refer to the selected frame; @code{t} refers
@@ -2900,6 +2916,12 @@ This function returns non-@code{nil} if face @var{face}
specifies
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
diff --git a/src/xdisp.c b/src/xdisp.c
index 1ecd912..63d0f32 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -21407,7 +21407,7 @@ append_space_for_newline (struct it *it, bool
default_face_p)
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))
@@ -21541,7 +21541,7 @@ append_space_for_newline (struct it *it, bool
default_face_p)
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;
@@ -21729,8 +21729,6 @@ extend_face_to_end_of_line (struct it *it)
}
}
- /* 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. */
diff --git a/src/xfaces.c b/src/xfaces.c
index 5577640..cc65527 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -2282,7 +2282,7 @@ filter_face_ref (Lisp_Object face_ref,
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.
@@ -6043,7 +6043,7 @@ compute_char_face (struct frame *f, int ch, Lisp_Object
prop)
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.
@@ -6126,7 +6126,8 @@ face_at_buffer_position (struct window *w, ptrdiff_t pos,
}
/* 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;
- [Emacs-diffs] feature/extend_face_id 1b2ae7b 06/19: Fixed extend face filtered for prop., (continued)
- [Emacs-diffs] feature/extend_face_id 1b2ae7b 06/19: Fixed extend face filtered for prop., Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id ca116c3 05/19: Call handle_face_prop_general to extend face., Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id 02e5564 07/19: Changed handle_face_prop_general prototype., Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id 4e37688 10/19: Extend face hl-line after end-of-line, Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id 5bbd540 11/19: Added parameter attr_filter to face_at_string_position., Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id 8df1e5f 13/19: Optimization in extend_face, Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id e9b2a69 03/19: New parameter to control the face extension.., Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id 943b093 09/19: Fix last change in append_space_for_newline., Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id b770fcd 08/19: Add space for cursor to work also in terminal., Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id c82cf17 12/19: Extend_face simplify., Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id 1112779 15/19: Document new :extend face attribute in manuals.,
Jimmy Aguilar Mena <=
- [Emacs-diffs] feature/extend_face_id a878135 16/19: *etc/NEWS: Added comment about :extend face attribute in NEWS., Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id 716537b 14/19: Fixed merge_face_ref recursive calls., Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id d305183 17/19: ; extend_face_id and fill_column_indicator corrections, Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id 5aad1a8 19/19: Fix issue calling face_at_pos., Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id aa6c09e 18/19: Modify face_at_pos to not modify change IT., Jimmy Aguilar Mena, 2019/10/13