Subject: bug#34476: fluffy whitespace in the mode-line, despite it running off the screen

From: Lars Ingebrigtsen <[email-masked]>
Date: Fri, 07 Aug 2020 14:15:21 +0200

Eli Zaretskii <[email-masked]> writes:

>> > And it formats the mode-line twice: once in format-mode-line, then
>> > again in display_string, right?
>> 
>> No, display_string just displays the string, I think?
>
> Which is a non-trivial amount of work: loading all the font glyphs
> again and accounting for their metrics, considering the faces, etc.
> All of which was already done.

I'm not very familiar with that code, but from my reading of it, none of
that has been done at this point.

I call Fformat_mode_line (format, Qnil, Qnil, Qnil); instead of
display_mode_element.  Fformat_mode_line sets

  mode_line_target = MODE_LINE_STRING;

or the like, and then calls display_mode_element, which then won't call
display_string at all, but just put all the computed elements in a list.

So nothing is displayed until that call to display_string, in my reading
of the code.

OK, I've now done some more testing -- I removed my call to
display_string, and no mode line is displayed at all, which kinda
supports my reading of the code?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no