Function: erc-log-matches

erc-log-matches is a byte-compiled function defined in erc-match.el.gz.

Signature

(erc-log-matches MATCH-TYPE NICKUSERHOST MESSAGE)

Documentation

Log matches in a separate buffer, determined by MATCH-TYPE.

The behavior of this function is controlled by the variables erc-log-matches-types-alist and erc-log-matches-flag. Specify the match types which should be logged in the former, and deactivate/activate match logging in the latter. See erc-log-match-format.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc-match.el.gz
(defun erc-log-matches (match-type nickuserhost message)
  "Log matches in a separate buffer, determined by MATCH-TYPE.
The behavior of this function is controlled by the variables
`erc-log-matches-types-alist' and `erc-log-matches-flag'.
Specify the match types which should be logged in the former,
and deactivate/activate match logging in the latter.
See `erc-log-match-format'."
  (when-let*
      ((erc-log-matches-flag)
       (_ (or (eq erc-log-matches-flag t) (erc-away-time)))
       (match-buffer-name (cdr (assq match-type erc-log-matches-types-alist)))
       (line (format-spec
              erc-log-match-format
              (erc-compat--defer-format-spec-in-buffer
               (?n . (or (erc--check-msg-prop 'erc--spkr)
                         (erc-extract-nick nickuserhost)))
               (?t . (format-time-string
                      (or (bound-and-true-p erc-timestamp-format)
                          "[%Y-%m-%d %H:%M] ")))
               (?c erc-default-target)
               (?m . message)
               (?u . nickuserhost)))))
    (with-current-buffer (erc-log-matches-make-buffer match-buffer-name)
      (with-silent-modifications
        (goto-char (point-max))
        (insert line)))))