Function: erc-call-hooks

erc-call-hooks is a byte-compiled function defined in erc-backend.el.gz.

Signature

(erc-call-hooks PROCESS MESSAGE)

Documentation

Call hooks associated with MESSAGE in PROCESS.

Finds hooks by looking in the erc-server-responses hash table.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc-backend.el.gz
(defun erc-call-hooks (process message)
  "Call hooks associated with MESSAGE in PROCESS.

Finds hooks by looking in the `erc-server-responses' hash table."
  (let ((erc--parsed-response message)
        (erc--msg-prop-overrides erc--msg-prop-overrides)
        (hook (or (erc-get-hook (erc-response.command message))
                  'erc-default-server-functions)))
    (run-hook-with-args-until-success hook process message)
    ;; Some handlers, like `erc-cmd-JOIN', open new targets without
    ;; saving excursion, and `erc-open' sets the current buffer.
    (erc-with-server-buffer
      (run-hook-with-args 'erc-timer-hook (erc-current-time)))))