- (define-key erc-mode-map (kbd "M-a") #'erc-track-switch-buffer)
-
- ;; hooks
- (defun b/erc-detach-or-kill-channel ()
- (if b/erc-detach-on-kill
- (when (erc-server-process-alive)
- (let ((tgt (erc-default-target)))
- (erc-server-send (format "DETACH %s" tgt) nil tgt)))
- (erc-kill-channel)))
- (add-hook 'erc-kill-channel-hook #'b/erc-detach-or-kill-channel)
- (remove-hook 'erc-kill-channel-hook #'erc-kill-channel))