Function: erc--format-speaker-input-message

erc--format-speaker-input-message is a byte-compiled function defined in erc.el.gz.

Signature

(erc--format-speaker-input-message MESSAGE)

Documentation

Assemble outgoing MESSAGE entered at the prompt for insertion.

Intend "input" to refer to interactive prompt input as well as the group of associated message-format templates from the
"speaker" catalog. Format the speaker portion in a manner
similar to that performed by erc-format-my-nick, but use either erc--message-speaker-input-chan-privmsg or erc--message-speaker-input-query-privmsg as a formatting template, with MESSAGE being the actual message body. Return a copy with possibly shared text-property values.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defun erc--format-speaker-input-message (message)
  "Assemble outgoing MESSAGE entered at the prompt for insertion.
Intend \"input\" to refer to interactive prompt input as well as
the group of associated message-format templates from the
\"speaker\" catalog.  Format the speaker portion in a manner
similar to that performed by `erc-format-my-nick', but use either
`erc--message-speaker-input-chan-privmsg' or
`erc--message-speaker-input-query-privmsg' as a formatting
template, with MESSAGE being the actual message body.  Return a
copy with possibly shared text-property values."
  (if-let* ((erc-show-my-nick)
            (nick (erc-current-nick))
            (pfx (erc-get-channel-membership-prefix nick))
            (erc-current-message-catalog erc--message-speaker-catalog)
            (key (if (or erc-format-query-as-channel-p
                         (erc--target-channel-p erc--target))
                     'input-chan-privmsg
                   'input-query-privmsg)))
      (progn
        (cond (erc--msg-props (puthash 'erc--msg key erc--msg-props))
              (erc--msg-prop-overrides (push (cons 'erc--msg key)
                                             erc--msg-prop-overrides)))
        (erc-format-message key ?p pfx ?n (erc--speakerize-nick nick)
                            ?m message))
    (propertize (concat "> " message) 'font-lock-face 'erc-input-face)))