erc-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Erc-discuss] erc-kill-buffer-stay


From: Bad Blue Bull
Subject: Re: [Erc-discuss] erc-kill-buffer-stay
Date: Tue, 26 Feb 2019 23:43:15 +0300

how it's diffirent from "/part" ?


26.02.2019, 22:15, "Emanuel Berg" <address@hidden>:

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
address@hidden
https://lists.gnu.org/mailman/listinfo/erc-discuss


reply via email to

[Prev in Thread] Current Thread [Next in Thread]