From 6fb767d2c0d24fd18510656926c65f01bc93be98 Mon Sep 17 00:00:00 2001 From: tsuchiya Date: Thu, 14 Feb 2002 04:03:35 +0000 Subject: [PATCH] (gnus-namazu-kill-summary-buffers): New advice. --- ChangeLog | 5 +++++ lisp/gnus-namazu.el | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) 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 -- 1.7.10.4