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

Propertize NICK with erc--speaker if not already present.

Do so to DISP instead if it's non-nil. In either case, assign NICK, sans properties, as the erc--speaker value. As a side effect, pair the latter string (the same eq-able object) with the symbol erc--spkr in the "msg prop" environment for any imminent erc-display-message invocations. While doing so, include any overrides defined in erc--message-speaker-catalog.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defun erc--speakerize-nick (nick &optional disp)
  "Propertize NICK with `erc--speaker' if not already present.
Do so to DISP instead if it's non-nil.  In either case, assign
NICK, sans properties, as the `erc--speaker' value.  As a side
effect, pair the latter string (the same `eq'-able object) with
the symbol `erc--spkr' in the \"msg prop\" environment for any
imminent `erc-display-message' invocations.  While doing so,
include any overrides defined in `erc--message-speaker-catalog'."
  (let ((plain-nick (substring-no-properties nick)))
    (erc--ensure-spkr-prop plain-nick (get erc--message-speaker-catalog
                                           'erc--msg-prop-overrides))
    (if (text-property-not-all 0 (length (or disp nick))
                               'erc--speaker nil (or disp nick))
        (or disp nick)
      (propertize (or disp nick) 'erc--speaker plain-nick))))