From: tsuchiya Date: Thu, 14 Feb 2002 04:03:35 +0000 (+0000) Subject: (gnus-namazu-kill-summary-buffers): New advice. X-Git-Tag: t-gnus-6_15_6-01-quimby~59 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6fb767d2c0d24fd18510656926c65f01bc93be98;p=elisp%2Fgnus.git- (gnus-namazu-kill-summary-buffers): New advice. --- diff --git a/ChangeLog b/ChangeLog index 2b1b428..96adaf1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-02-14 TSUCHIYA Masatoshi + + * lisp/gnus-namazu.el (gnus-namazu-kill-summary-buffers): New + advice. + 2002-02-12 Katsumi Yamaoka * lisp/mm-view.el: Require `gnus-mailcap' rather than `mailcap'. diff --git a/lisp/gnus-namazu.el b/lisp/gnus-namazu.el index 01ad845..458729d 100644 --- a/lisp/gnus-namazu.el +++ b/lisp/gnus-namazu.el @@ -598,6 +598,23 @@ and make a virtual group contains its results." '<))) (message "No entry.")))) +(let (current-load-list) + (defadvice gnus-offer-save-summaries + (before gnus-namazu-kill-summary-buffers activate compile) + "Advised by `gnus-namazu'. +In order to avoid annoying questions, kill summary buffers which +generated by `gnus-namazu' itself before `gnus-offer-save-summaries' +is called." + (let ((buffers (buffer-list))) + (while buffers + (when (with-current-buffer (car buffers) + (and (eq major-mode 'gnus-summary-mode) + (gnus-ephemeral-group-p gnus-newsgroup-name) + (string-match gnus-namazu/group-name-regexp + gnus-newsgroup-name))) + (kill-buffer (car buffers))) + (setq buffers (cdr buffers)))))) + (defun gnus-namazu-insinuate () (add-hook 'gnus-group-mode-hook