> > User customization could be accommodated by something like the below (naive) patch. We define
> > fill-column-indicator face to have unspecified background; when displaying the indicator we merge the
> > indicator face into the current it->face_id (the same face used for the stretch glyph preceding the indicator).
> What about the case there's no stretch, i.e. the indicator directly
Apologies for my poor phrasing, but I think you might misunderstand the intent. I meant that we use the background that is in effect before we draw anything related to the indicator, not that we take the face *from* the stretch glyph.
I did miss that the indicator is also drawn in append_space_for_newline. Revised patch below.
diff --git a/lisp/faces.el b/lisp/faces.el
index b933279064..207b627f25 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -2502,7 +2502,9 @@ line-number-current-line
;; Definition stolen from display-line-numbers.
(defface fill-column-indicator
- '((t :inherit (shadow default)))
+ '((t :inherit shadow :weight normal :slant normal
+ :underline nil :overline nil :strike-through nil
+ :box nil :invert-video nil :stipple nil))
"Face for displaying fill column indicator.
This face is used when `display-fill-column-indicator-mode' is
non-nil."
diff --git a/src/xdisp.c b/src/xdisp.c
index 1782748144..61ea050b4a 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -20201,7 +20201,7 @@ append_space_for_newline (struct it *it, bool default_face_p)
XFIXNAT (Vdisplay_fill_column_indicator_character);
it->face_id =
merge_faces (it->w, Qfill_column_indicator,
- 0, DEFAULT_FACE_ID);
+ 0, saved_face_id);
face = FACE_FROM_ID(it->f, it->face_id);
goto produce_glyphs;
}
@@ -20494,7 +20494,7 @@ extend_face_to_end_of_line (struct it *it)
XFIXNAT (Vdisplay_fill_column_indicator_character);
it->face_id =
merge_faces (it->w, Qfill_column_indicator,
- 0, DEFAULT_FACE_ID);
+ 0, saved_face_id);
PRODUCE_GLYPHS (it);
}
@@ -20658,7 +20658,7 @@ extend_face_to_end_of_line (struct it *it)
{
const int saved_face = it->face_id;
it->face_id =
- merge_faces (it->w, Qfill_column_indicator, 0, DEFAULT_FACE_ID);
+ merge_faces (it->w, Qfill_column_indicator, 0, saved_face);
it->c = it->char_to_display =
XFIXNAT (Vdisplay_fill_column_indicator_character);
PRODUCE_GLYPHS (it);