Subject: bug#71345: Feature: unleash font-lock's secret weapon; handle Qfontified = non-nil

From: Eli Zaretskii <[email-masked]>
Date: Wed, 05 Jun 2024 19:38:16 +0300

> From: Stefan Monnier <[email-masked]>
> Cc: [email-masked],  [email-masked],  [email-masked]
> Date: Wed, 05 Jun 2024 12:28:01 -0400
> 
> >> Because a given buffer can have several (window-)points,
> >> position-dependent highlighting will ideally want to be added via
> >> (window-specific) overlays rather than text-properties.
> >
> > Not sure I understand how this remark is relevant to the issue
> > discussed here, but let me just point out that when redisplay starts
> > working on a window, it temporarily moves point to the window-point
> > position.  So position-dependent highlighting will behave in each
> > window according to its window-point, which I think is what's expected
> > here?
> 
> But the highlighting is done "once and for all" (at least until the next
> command), so if you want it to be different in different windows (to
> reflect the different values of `point` in those windows) you'll need
> overlays with the `window` property because the highlighting will not be
> re-done in the middle of redisplay when we go from one window to another.

In that case, we are in trouble anyway, because the "once and for all"
highlighting could be (by sheer luck) be done by display code that
doesn't run as part of redisplay, but as part of something else, like
vertical-motion.