]> git.eshelyaron.com Git - emacs.git/commit
Don't kill server buffer with erc-kill-buffer-on-part
authorF. Jason Park <jp@neverwas.me>
Wed, 15 May 2024 04:09:55 +0000 (21:09 -0700)
committerEshel Yaron <me@eshelyaron.com>
Thu, 23 May 2024 07:41:30 +0000 (09:41 +0200)
commit828aac06bd5aefb575547b069f8abbc7425dea17
treead22b9c1764f51a1c588cf295049b88201d2517b
parent9b991680af64572c284e706e49a18d274139b643
Don't kill server buffer with erc-kill-buffer-on-part

* etc/ERC-NEWS: Mention new flag `erc-killing-buffer-on-part-p' and
the renaming of `erc-kill-channel'.
* lisp/erc/erc-backend.el (erc-server-PART): Only kill a buffer on
behalf of `erc-kill-buffer-on-part' when the buffer hasn't already
been killed, and bind `erc-killing-buffer-on-part-p' to t when doing
so.
* lisp/erc/erc-log.el (erc-conditional-save-buffer): Don't save logs
when the buffer parameter is nil because that causes the server buffer
to be saved out.  It's possible that user code relying on this
longstanding bug will be affected, however, by default, the server
buffer will also be saved out independently at designated junctures.
* lisp/erc/erc.el (erc-part-hook): Redo doc string.
(erc-killing-buffer-on-part-p): New variable, a flag to prevent
redundant execution of `erc-kill-channel-hook' members concerned with
parted channels.
(erc-kill-buffer-on-part): Tweak doc string.
(erc-kill-channel-hook): Use new name for `erc-kill-channel',
`erc-part-channel-on-kill'.
(erc-kill-channel, erc-part-channel-on-kill): Rename former to latter,
and inhibit execution when `erc-killing-buffer-on-part-p' is non-nil.
* test/lisp/erc/erc-scenarios-base-kill-on-part.el: New file.
(Bug#70840)

(cherry picked from commit cf7cc4c630a2cd71c52069237053cb1476104572)
etc/ERC-NEWS
lisp/erc/erc-backend.el
lisp/erc/erc-log.el
lisp/erc/erc.el
test/lisp/erc/erc-scenarios-base-kill-on-part.el [new file with mode: 0644]