Subject: bug#59805: 28.2; erc-track: handle faces modified with erc-button-add-face

From: "J.P." <[email-masked]>
Date: Mon, 12 Dec 2022 06:36:57 -0800

"J.P." <[email-masked]> writes:

> Just noticed a semi-flagrant bug here (not yours).
>
> I'm seeing that `font-lock-default-function' (at least these days) adds
> buffer-local variables to the current buffer, making this test a
> polluter. To better respect the commons, we probably ought to do
> something more like this:
>
>   (ert-deftest erc-track--erc-faces-in ()
> [...]
>       (with-current-buffer (get-buffer-create "*erc-track--erc-faces-in*")
>         (font-lock-default-function 1) ; set buffer-local variables

Yeah, this is nonsense (sorry, people). Not sure what I was smoking, but
ERT runs its tests in a temporary buffer, so buffer-local stuff just
evaporates.