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

Previous Next

Package: emacs;

Reported by: Nacho Barrientos <nacho.barrientos <at> cern.ch>

Date: Sat, 3 Dec 2022 13:06:02 UTC

Severity: normal

Found in version 28.2

Done: "J.P." <jp <at> neverwas.me>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "J.P." <jp <at> neverwas.me>
To: 59805 <at> debbugs.gnu.org
Cc: emacs-erc <at> gnu.org, git <at> david.leatherman.fm, nacho.barrientos <at> cern.ch
Subject: bug#59805: 28.2; erc-track: handle faces modified with erc-button-add-face
Date: Mon, 12 Dec 2022 06:36:57 -0800
"J.P." <jp <at> 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.




This bug report was last modified 1 year and 354 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.