]> git.eshelyaron.com Git - emacs.git/commit
Leverage inverse-video for erc-inverse-face
authorF. Jason Park <jp@neverwas.me>
Fri, 8 Mar 2024 05:53:11 +0000 (21:53 -0800)
committerEshel Yaron <me@eshelyaron.com>
Mon, 11 Mar 2024 09:25:38 +0000 (10:25 +0100)
commitbb2a758761e520eea3db722d12b1cf3dfa6961f3
tree82c32b7b480dd2713aab24a70176a079b9925c99
parent12516f2502dd94ca15906abbe2acb2524f5988fd
Leverage inverse-video for erc-inverse-face

* lisp/erc/erc-goodies.el (erc-inverse-face): Specify face attribute
`:inverse-video' (née :reverse-video) to swap foreground and
background colors over affected intervals, as per
https://modern.ircdocs.horse/formatting#reverse-color.
(erc-control-default-fg erc-control-default-bg): New faces for IRC
color-code number 99.  Ignore the ERC convention of prefixing
control-code-derived faces with "fg:" and "bg:" because it doesn't
comport with modern sensibilities, which demand identifiers normally
be namespaced.
(erc-get-bg-color-face, erc-get-fg-color-face): Return new, dedicated
faces instead of `default', and don't nest them in a list.
* test/lisp/erc/erc-goodies-tests.el
(erc-controls-highlight--inverse): Redo completely, asserting behavior
described in the spec linked to above.
(erc-controls-highlight--spoilers): New test based on the body of the
old `erc-controls-highlight--inverse', except without shadowing
`erc-insert-modify-hook' with an unrealistic, idealized value.  Adjust
expected buffer state to reflect the new role of
`erc-spoiler-face'.  (Bug#69597)

(cherry picked from commit 7b4ca9e609e2eadc824313053e70d7272d360b9d)
lisp/erc/erc-goodies.el
test/lisp/erc/erc-goodies-tests.el