Function: erc-kill-buffer-function
erc-kill-buffer-function is a byte-compiled function defined in
erc.el.gz.
Signature
(erc-kill-buffer-function)
Documentation
Function to call when an ERC buffer is killed.
This function should be on kill-buffer-hook.
When the current buffer is in erc-mode, this function will run
one of the following hooks:
erc-kill-server-hook if the server buffer was killed,
erc-kill-channel-hook if a channel buffer was killed,
or erc-kill-buffer-hook if any other buffer.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defun erc-kill-buffer-function ()
"Function to call when an ERC buffer is killed.
This function should be on `kill-buffer-hook'.
When the current buffer is in `erc-mode', this function will run
one of the following hooks:
`erc-kill-server-hook' if the server buffer was killed,
`erc-kill-channel-hook' if a channel buffer was killed,
or `erc-kill-buffer-hook' if any other buffer."
(when (eq major-mode 'erc-mode)
(erc-remove-channel-users)
(cond
((eq (erc-server-buffer) (current-buffer))
(run-hooks 'erc-kill-server-hook))
((erc-channel-p (or (erc-default-target) (buffer-name)))
(run-hooks 'erc-kill-channel-hook))
(t
(run-hooks 'erc-kill-buffer-hook)))))