Function: erc--speakerize-nick
erc--speakerize-nick is a byte-compiled function defined in erc.el.gz.
Signature
(erc--speakerize-nick NICK &optional DISP)
Documentation
Return propertized NICK with canonical NICK in erc--speaker.
Return propertized DISP instead if given. As a side effect, pair NICK
with erc--spkr in the "msg prop" environment for any imminent
erc-display-message invocations, and include any overrides defined in
erc--message-speaker-catalog. Expect NICK (but not necessarily DISP)
to be absent of any existing text properties.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defun erc--speakerize-nick (nick &optional disp)
"Return propertized NICK with canonical NICK in `erc--speaker'.
Return propertized DISP instead if given. As a side effect, pair NICK
with `erc--spkr' in the \"msg prop\" environment for any imminent
`erc-display-message' invocations, and include any overrides defined in
`erc--message-speaker-catalog'. Expect NICK (but not necessarily DISP)
to be absent of any existing text properties."
(when-let* ((erc-server-process)
(cusr (erc-get-server-user nick)))
(setq nick (erc-server-user-nickname cusr)))
(erc--ensure-spkr-prop nick (get erc--message-speaker-catalog
'erc--msg-prop-overrides))
(propertize (or disp nick) 'erc--speaker nick))