Subject: Re: bug#37774: 27.0.50; new :extend attribute broke visuals of all themes and other packages

From: Jonas Bernoulli <[email-masked]>
Date: Wed, 06 Nov 2019 17:26:12 +0100

Eli Zaretskii <[email-masked]> writes:
> Is there an easier way of reproducing this than installing Magit and
> actually using it?  Could you perhaps come up with a much simpler
> recipe that just defines a face like Magit does?

Sorry for the delay.  I have finally reproduced some of the unexpected
behavior without using Magit.

Yank the following in some buffer like *scratch*.

------
(defface testing '((t (:background "LightYellow"))) "DOC")

(overlay-put (make-overlay (point-min) (point-max) nil t)
             'face ; or 'font-lock-face
             'testing)

(remove-overlays (point-min) (point-max))

(put-text-property (point-min) (point-max) 'font-lock-face 'testing)
------

Evaluate just the first two forms and notice that the `testing' face is
used beyond eol.  At that point I assummed I had narrowed down the issue
to overlays, but then I evaluated the next two forms and that resulted
in the same issue (the comment and strings used different faces, but
that is due to font-lock using two fontification phases I believe).

I have not yet looked into why Magit's diff faces extend beyond eol even
though I didn't tell them too, but the above is so surprising to me that
I will wait to hear back from you about that first before investigating
any further.