[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r107871: Kill channel buffers when ki
From: |
Lars Magne Ingebrigtsen |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r107871: Kill channel buffers when killing rcirc server buffers |
Date: |
Wed, 11 Apr 2012 16:22:36 +0200 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 107871
fixes bug(s): http://debbugs.gnu.org/5128
author: Deniz Dogan <address@hidden>
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Wed 2012-04-11 16:22:36 +0200
message:
Kill channel buffers when killing rcirc server buffers
* net/rcirc.el (rcirc-kill-channel-buffers): New variable.
(rcirc-kill-buffer-hook): Use it to kill channel buffers.
modified:
lisp/ChangeLog
lisp/net/rcirc.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-04-11 11:57:21 +0000
+++ b/lisp/ChangeLog 2012-04-11 14:22:36 +0000
@@ -1,3 +1,8 @@
+2012-04-11 Deniz Dogan <address@hidden>
+
+ * net/rcirc.el (rcirc-kill-channel-buffers): New variable.
+ (rcirc-kill-buffer-hook): Use it to kill channel buffers (bug#5128).
+
2012-04-11 William Stevenson <address@hidden>
* textmodes/artist.el (artist-mode): Convert artist-mode to use
=== modified file 'lisp/net/rcirc.el'
--- a/lisp/net/rcirc.el 2012-04-09 13:05:48 +0000
+++ b/lisp/net/rcirc.el 2012-04-11 14:22:36 +0000
@@ -361,6 +361,14 @@
:type 'string
:group 'rcirc)
+(defcustom rcirc-kill-channel-buffers nil
+ "When non-nil, kill channel buffers when the server buffer is killed.
+Only the channel buffers associated with the server in question
+will be killed."
+ :version "24.2"
+ :type 'boolean
+ :group 'rcirc)
+
(defvar rcirc-nick nil)
(defvar rcirc-prompt-start-marker nil)
@@ -1088,12 +1096,20 @@
:group 'rcirc)
(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' 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)
(when (and rcirc-log-flag
rcirc-log-directory)
(rcirc-log-write))
- (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)
+ (dolist (channel rcirc-buffer-alist)
+ (kill-buffer (cdr channel))))))
(defun rcirc-change-major-mode-hook ()
"Part the channel when changing the major-mode."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r107871: Kill channel buffers when killing rcirc server buffers,
Lars Magne Ingebrigtsen <=