emacs-erc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug#59805: 28.2; erc-track: handle faces modified with erc-button-ad


From: J.P.
Subject: Re: bug#59805: 28.2; erc-track: handle faces modified with erc-button-add-face
Date: Mon, 12 Dec 2022 06:36:57 -0800
User-agent: Gnus/5.13 (Gnus v5.13)

"J.P." <jp@neverwas.me> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]