* bug#5128: [PATCH] rcirc: Option to kill channel buffers when their server buffer is killed
@ 2009-12-05 16:41 Deniz Dogan
2012-04-11 14:23 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 3+ messages in thread
From: Deniz Dogan @ 2009-12-05 16:41 UTC (permalink / raw)
To: submit
[-- Attachment #1: Type: text/plain, Size: 185 bytes --]
The attached patch adds the option to kill all channel buffers
associated with a specific server when the buffer for that server is
killed. It is nil (off) by default.
--
Deniz Dogan
[-- Attachment #2: rcirc-patch.diff --]
[-- Type: application/octet-stream, Size: 1383 bytes --]
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index d1f54c9..3df94a2 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -315,6 +315,12 @@ and the cdr part is used for encoding."
:type 'function
:group 'rcirc)
+(defcustom rcirc-kill-channel-buffers-with-server-buffer nil
+ "When non-nil, kills any channel buffers associated with a
+server buffer when the latter is killed."
+ :type 'boolean
+ :group 'rcirc)
+
(defvar rcirc-nick nil)
(defvar rcirc-prompt-start-marker nil)
@@ -981,9 +987,17 @@ If ALL is non-nil, update prompts in all IRC buffers."
(eq (aref target 0) ?&))))
(defun rcirc-kill-buffer-hook ()
- "Part the channel when killing an rcirc buffer."
+ "Part the channel when killing an rcirc buffer.
+
+If rcirc-kill-channel-buffers-with-server-buffer is non-nil and
+the killed buffer is a server buffer, kills all of the channel
+buffers associated with it."
(when (eq major-mode 'rcirc-mode)
- (rcirc-clean-up-buffer "Killed buffer")))
+ (rcirc-clean-up-buffer "Killed buffer")
+ (when (and rcirc-buffer-alist ;; it's a server buffer
+ rcirc-kill-channel-buffers-with-server-buffer
+ (dolist (channel rcirc-buffer-alist)
+ (kill-buffer (cdr channel)))))))
(defun rcirc-change-major-mode-hook ()
"Part the channel when changing the major-mode."
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#5128: [PATCH] rcirc: Option to kill channel buffers when their server buffer is killed
2009-12-05 16:41 bug#5128: [PATCH] rcirc: Option to kill channel buffers when their server buffer is killed Deniz Dogan
@ 2012-04-11 14:23 ` Lars Magne Ingebrigtsen
2012-04-12 17:32 ` Deniz Dogan
0 siblings, 1 reply; 3+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-04-11 14:23 UTC (permalink / raw)
To: Deniz Dogan; +Cc: 5128
Deniz Dogan <deniz.a.m.dogan@gmail.com> writes:
> The attached patch adds the option to kill all channel buffers
> associated with a specific server when the buffer for that server is
> killed. It is nil (off) by default.
Looks good. I've applied it to trunk with some changes. Could you test
whether it still works as it's supposed to?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#5128: [PATCH] rcirc: Option to kill channel buffers when their server buffer is killed
2012-04-11 14:23 ` Lars Magne Ingebrigtsen
@ 2012-04-12 17:32 ` Deniz Dogan
0 siblings, 0 replies; 3+ messages in thread
From: Deniz Dogan @ 2012-04-12 17:32 UTC (permalink / raw)
To: Lars Magne Ingebrigtsen; +Cc: 5128, Deniz Dogan
On 2012-04-11 16:23, Lars Magne Ingebrigtsen wrote:
> Deniz Dogan<deniz.a.m.dogan@gmail.com> writes:
>
>> The attached patch adds the option to kill all channel buffers
>> associated with a specific server when the buffer for that server is
>> killed. It is nil (off) by default.
>
> Looks good. I've applied it to trunk with some changes. Could you test
> whether it still works as it's supposed to?
>
Thanks, it seems to work fine still!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-04-12 17:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-05 16:41 bug#5128: [PATCH] rcirc: Option to kill channel buffers when their server buffer is killed Deniz Dogan
2012-04-11 14:23 ` Lars Magne Ingebrigtsen
2012-04-12 17:32 ` Deniz Dogan
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.