Subject: Re: bug#2034: [PATCH] 27.0.50; Support mode line constructs for `mode-name' in c-mode

From: Eli Zaretskii <[email-masked]>
Date: Wed, 04 Jul 2018 05:41:00 +0300

> Date: Tue, 03 Jul 2018 10:53:30 +1200
> From: Phil Sainty <[email-masked]>
> Cc: [email-masked], bug-gnu-emacs
>  <bug-gnu-emacs-bounces+psainty=[email-masked]>
> 
> On 2018-07-03 03:29, Eli Zaretskii wrote:
> > I've just skimmed the patch, so apologies in advance if what I'm
> > saying makes no sense.  That said, did you try to compare the old and
> > the new code when the flag strings have text properties, like faces or
> > colors?  The mode-line formatting code is tricky when text properties
> > are involved.
> 
> I haven't, but I don't *think* that's going to be a concern here.
> 
> The code which formats the string of flags hasn't changed, and the
> substrings (individual flags) which are passed to `format' are string
> literals with no properties, so AFAICS the formatted string of flags
> will not have any text properties when it is generated (which happens
> afresh each time `c-update-modeline' is called).
> 
> If I'm missing something here, I think I'll need some guidance on
> how to test for potential problems.

Give each of the substrings you concatenate a different face, and see
what happens after concatenation when the result is shown on the mode
line.