Function: erc-match--user-nuh-or-mention-p
erc-match--user-nuh-or-mention-p is a byte-compiled function defined
in erc-match.el.gz.
Signature
(erc-match--user-nuh-or-mention-p MATCH)
Documentation
Return non-nil on matching "NUH" for MATCH object.
Also do so on mentions if the category is fool or the corresponding
"part" option is nick-or-mention.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc-match.el.gz
(defun erc-match--user-nuh-or-mention-p (match)
"Return non-nil on matching \"NUH\" for MATCH object.
Also do so on mentions if the category is `fool' or the corresponding
\"part\" option is `nick-or-mention'."
(and-let* ((patterns (erc-match-traditional-data match)))
(or (string-match (erc-match--opt-pat-get #'erc-match--opt-pat-make
patterns)
(erc-match-sender match))
(and (or (eq (erc-match-traditional-category match) 'fool)
(eq (erc-match-traditional-part match) 'nick-or-mention))
;; Mimic `erc-match-directed-at-fool-p', but search
;; the narrowed buffer instead of a string argument.
(goto-char (erc-match-body-beg match))
(or (looking-at (erc-match--opt-pat-get
#'erc-match--opt-pat-make-addr-beg
patterns))
(search-forward-regexp
(erc-match--opt-pat-get #'erc-match--opt-pat-make-addr-end
patterns)
nil t))))))