Function: erc-nicks--assess-track-faces

erc-nicks--assess-track-faces is a byte-compiled function defined in erc-nicks.el.gz.

Signature

(erc-nicks--assess-track-faces CURRENT CONTENDER RANKS NORMALS)

Documentation

Return symbol face for CURRENT or t, to mean CURRENT is replaceable.

But only do so if CURRENT and CONTENDER are either nil or "normal" faces ranking at or below erc-nicks-track-normal-max-rank. See erc-track--select-mode-line-face for the expected types of RANKS and NORMALS. Expect a non-nil CONTENDER to always be ranked.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc-nicks.el.gz
(defun erc-nicks--assess-track-faces (current contender ranks normals)
  "Return symbol face for CURRENT or t, to mean CURRENT is replaceable.
But only do so if CURRENT and CONTENDER are either nil or \"normal\"
faces ranking at or below `erc-nicks-track-normal-max-rank'.  See
`erc-track--select-mode-line-face' for the expected types of RANKS and
NORMALS.  Expect a non-nil CONTENDER to always be ranked."
  (and-let*
      (((or (null contender) (gethash contender normals)))
       ((or (null current) (gethash current normals)))
       (threshold (gethash erc-nicks-track-normal-max-rank (car ranks)))
       ((or (null contender) (<= threshold (gethash contender (car ranks)))))
       ((or (erc-nicks--ours-p current)
            (null current)
            (<= threshold (or (gethash current (car ranks)) 0)))))))