From 94b881d9283348b1dec7f82142ec707620c7d45c Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 15 Feb 2001 03:18:15 +0000 Subject: [PATCH] Synch with Oort Gnus. --- lisp/ChangeLog | 12 ++++++++++++ lisp/gnus-srvr.el | 20 +++++++++++--------- lisp/nnagent.el | 4 ++++ lisp/nnfolder.el | 2 +- lisp/nnml.el | 11 ++++++----- 5 files changed, 34 insertions(+), 15 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4052629..58170ad 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,15 @@ +2001-02-14 21:00:00 ShengHuo ZHU + + * gnus-srvr.el (gnus-server-regenerate-server): Use gnus-get-function. + + * nnagent.el (nnagent-request-regenerate): New. + + * nnfolder.el (nnfolder-request-regenerate): Deffoo. + + * nnml.el (nnml-generate-nov-databases): Accept argument + server. Don't open server if it is opened. + (nnml-request-regenerate): Use it. Change to deffoo. + 2001-02-14 Katsumi Yamaoka Committed by ShengHuo ZHU diff --git a/lisp/gnus-srvr.el b/lisp/gnus-srvr.el index 6f619e1..896464d 100644 --- a/lisp/gnus-srvr.el +++ b/lisp/gnus-srvr.el @@ -838,15 +838,17 @@ buffer. (let ((server (gnus-server-server-name))) (unless server (error "No server on the current line")) - (if (not (gnus-check-backend-function - 'request-regenerate (car (gnus-server-to-method server)))) - (error "This backend doesn't support regeneration") - (gnus-message 5 "Requesting regeneration of %s..." server) - (unless (gnus-open-server server) - (error "Couldn't open server")) - (if (gnus-request-regenerate server) - (gnus-message 5 "Requesting regeneration of %s...done" server) - (gnus-message 5 "Couldn't regenerate %s" server))))) + (condition-case () + (gnus-get-function (gnus-server-to-method server) + 'request-regenerate) + (error + (error "This backend doesn't support regeneration"))) + (gnus-message 5 "Requesting regeneration of %s..." server) + (unless (gnus-open-server server) + (error "Couldn't open server")) + (if (gnus-request-regenerate server) + (gnus-message 5 "Requesting regeneration of %s...done" server) + (gnus-message 5 "Couldn't regenerate %s" server)))) (provide 'gnus-srvr) diff --git a/lisp/nnagent.el b/lisp/nnagent.el index b445395..50777ac 100644 --- a/lisp/nnagent.el +++ b/lisp/nnagent.el @@ -192,6 +192,10 @@ (nnoo-parent-function 'nnagent 'nnml-status-message (list (nnagent-server server)))) +(deffoo nnagent-request-regenerate (server) + (nnoo-parent-function 'nnagent 'nnml-request-regenerate + (list (nnagent-server server)))) + ;; Use nnml functions for just about everything. (nnoo-import nnagent (nnml)) diff --git a/lisp/nnfolder.el b/lisp/nnfolder.el index ba9dc38..4329617 100644 --- a/lisp/nnfolder.el +++ b/lisp/nnfolder.el @@ -554,7 +554,7 @@ all. This may very well take some time.") (kill-buffer (current-buffer)) t)))) -(defun nnfolder-request-regenerate (server) +(deffoo nnfolder-request-regenerate (server) (nnfolder-possibly-change-group nil server) (nnfolder-generate-active-file) t) diff --git a/lisp/nnml.el b/lisp/nnml.el index 6f1bd6b..2c05a5e 100644 --- a/lisp/nnml.el +++ b/lisp/nnml.el @@ -159,9 +159,9 @@ all. This may very well take some time.") server nnml-directory) t))) -(defun nnml-request-regenerate (server) +(deffoo nnml-request-regenerate (server) (nnml-possibly-change-directory nil server) - (nnml-generate-nov-databases) + (nnml-generate-nov-databases server) t) (deffoo nnml-request-article (id &optional group server buffer) @@ -714,13 +714,14 @@ all. This may very well take some time.") (setq nnml-nov-buffer-alist (cdr nnml-nov-buffer-alist))))) ;;;###autoload -(defun nnml-generate-nov-databases () +(defun nnml-generate-nov-databases (&optional server) "Generate NOV databases in all nnml directories." - (interactive) + (interactive (list (or (nnoo-current-server 'nnml) ""))) ;; Read the active file to make sure we don't re-use articles ;; numbers in empty groups. (nnmail-activate 'nnml) - (nnml-open-server (or (nnoo-current-server 'nnml) "")) + (unless (nnml-server-opened server) + (nnml-open-server server)) (setq nnml-directory (expand-file-name nnml-directory)) ;; Recurse down the directories. (nnml-generate-nov-databases-1 nnml-directory nil t) -- 1.7.10.4