Is something like this already present in ERC?
--
If so I didn't find it, and I think it is very
handy. Also feel free to suggest improvements
to the code, as alays.
(defun erc-kill-buffer-stay ()
"Close the current ERC buffer (i.e., leave the channel)
but stay in ERC."
(interactive)
(when (or (not (erc-server-buffer-live-p))
(= ?y (read-char "press `y' to leave the channel")) )
(let ((erc-buffers (erc-buffer-list)))
(if (= 1 (length erc-buffers)) (kill-buffer)
(cl-loop for b in erc-buffers
when (neq b (current-buffer))
do (kill-buffer)
(switch-to-buffer b)
(cl-return) )))))
More ERC stuff:
http://user.it.uu.se/~embe8573/emacs-init/erc-my.el
underground experts united
http://user.it.uu.se/~embe8573
_______________________________________________
Erc-discuss mailing list
Erc-discuss@gnu.org
https://lists.gnu.org/mailman/listinfo/erc-discuss