From b4edb60f15a6b49c6b5443f0769a0d2cf33e1ff8 Mon Sep 17 00:00:00 2001 From: Trevor Arjeski Date: Tue, 1 Oct 2024 18:21:02 +0300 Subject: [PATCH] Make erc-nicks respect pal and fool faces The erc-nicks colors should not highlight over a nick that is a pal or a fool. This change checks if the nick is a pal or a fool and uses the respective face in erc-nicks--face-table from there on out. --- erc-nicks.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erc-nicks.el b/erc-nicks.el index a0d6d17..e8258ef 100644 --- a/erc-nicks.el +++ b/erc-nicks.el @@ -67,6 +67,7 @@ ;;; Code: (require 'erc-button) +(require 'erc-match) (require 'color) (defgroup erc-nicks nil @@ -464,6 +465,9 @@ Favor a custom erc-nicks-NICK@NETWORK-face when defined." (erc-network-name) "-face"))) ((or (and (facep face) face) (erc-nicks--revive face face nick (erc-network)))))) + (let ((face (or (when (erc-match-pal-p nick nil) 'erc-pal-face) + (when (erc-match-fool-p nick nil) 'erc-fool-face)))) + (puthash nick face table)) (let ((color (erc-nicks--determine-color key)) (new-face (make-symbol (concat "erc-nicks-" nick "-face")))) (put new-face 'erc-nicks--nick nick) -- 2.46.2