+2001-02-14 21:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * 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 <yamaoka@jpl.org>
Committed by ShengHuo ZHU <zsh@cs.rochester.edu>
(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)
(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))
(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)
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)
(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)