- (erase-buffer)
- (setq subject (nth 2 (assq (car elem) topics)))
- (nnweb-insert (nth 3 (assq (car elem) topics)))
- (goto-char (point-min))
- (setq contents (w3-parse-buffer (current-buffer)))
- (setq table (nnultimate-find-forum-table contents))
- (setq string (mapconcat 'identity (nnweb-text table) ""))
- (when (string-match "topic is \\([0-9]\\) pages" string)
- (setq pages (string-to-number (match-string 1 string)))
- (setcdr table nil)
- (setq table (nnultimate-find-forum-table contents)))
- (setq contents (cdr (nth 2 (car (nth 2 table)))))
+ (setq pages 1
+ current-page 1
+ total-contents nil)
+ (while (<= current-page pages)
+ (erase-buffer)
+ (setq subject (nth 2 (assq (car elem) topics)))
+ (setq href (nth 3 (assq (car elem) topics)))
+ (if (= current-page 1)
+ (nnweb-insert href)
+ (string-match "\\.html$" href)
+ (nnweb-insert (concat (substring href 0 (match-beginning 0))
+ "-" (number-to-string current-page)
+ (match-string 0 href))))
+ (goto-char (point-min))
+ (setq contents (w3-parse-buffer (current-buffer)))
+ (setq table (nnultimate-find-forum-table contents))
+ (setq string (mapconcat 'identity (nnweb-text table) ""))
+ (when (string-match "topic is \\([0-9]\\) pages" string)
+ (setq pages (string-to-number (match-string 1 string)))
+ (setcdr table nil)
+ (setq table (nnultimate-find-forum-table contents)))
+ (setq contents (cdr (nth 2 (car (nth 2 table)))))
+ (setq total-contents (nconc total-contents contents))
+ (incf current-page))
+ (setq total-contents (nreverse total-contents))