&& (*BYTE_POS_ADDR (IT_BYTEPOS (*it)) == ' ' \
|| *BYTE_POS_ADDR (IT_BYTEPOS (*it)) == '\t')))) \
+/* Test all the conditions needed to print the fill column indicator. */
+#define FILL_COLUMN_INDICATOR_NEEDED(it) \
+ !NILP (Vdisplay_fill_column_indicator) \
+ && (it->continuation_lines_width == 0) \
+ && (!NILP (Vdisplay_fill_column_indicator_column)) \
+ && FIXNATP (Vdisplay_fill_column_indicator_character)
+
/* True means print newline to stdout before next mini-buffer message. */
bool noninteractive_need_newline;
/* Corner case for when display-fill-column-indicator-mode
is active and the extra character should be added in the
same place than the line */
- if (!NILP (Vdisplay_fill_column_indicator)
- && (it->w->pseudo_window_p == 0)
- && (!NILP (Vdisplay_fill_column_indicator_column))
- && FIXNATP (Vdisplay_fill_column_indicator_character))
+ if ((it->w->pseudo_window_p == 0)
+ && FILL_COLUMN_INDICATOR_NEEDED(it))
{
int fill_column_indicator_column = -1;
/* Display fill column indicator if not in modeline or
toolbar and display fill column indicator mode is
active */
- if (!NILP (Vdisplay_fill_column_indicator)
- && (it->w->pseudo_window_p == 0)
- && (!NILP (Vdisplay_fill_column_indicator_column))
- && FIXNATP (Vdisplay_fill_column_indicator_character))
+ if ((it->w->pseudo_window_p == 0)
+ && FILL_COLUMN_INDICATOR_NEEDED(it))
{
int fill_column_indicator_column = -1;
else
it->face_id = face->id;
- /* Display fill-column-line if mode is active */
- if (!NILP (Vdisplay_fill_column_indicator)
- && (!NILP (Vdisplay_fill_column_indicator_column))
- && FIXNATP (Vdisplay_fill_column_indicator_character))
+ /* Display fill-column-line if needed. */
+ if (FILL_COLUMN_INDICATOR_NEEDED(it))
{
int fill_column_indicator_column = -1;
+ /* Vdisplay_fill_column_indicator_column accepts the special value t
+ to use the default fill-column variable. */
if (EQ (Vdisplay_fill_column_indicator_column, Qt)
&& FIXNATP (BVAR (current_buffer, fill_column)))
fill_column_indicator_column =