- (string-match "/\\([0-9]+\\).html" href)
- (setq topic (string-to-number (match-string 1 href)))
- (if (setq tinfo (assq topic topics))
- (progn
- (setq old-max (cadr tinfo))
- (setcar (cdr tinfo) garticles))
- (setq old-max 0)
- (push (list topic garticles subject href) topics)
- (setcar (nthcdr 4 entry) topics))
- (when (not (= old-max garticles))
- (setq inc (- garticles old-max))
- (setq mapping (nconc mapping
- (list
- (list
- old-total (1- (incf old-total inc))
- topic (1+ old-max)))))
- (incf old-max inc)
- (setcar (nthcdr 5 entry) mapping)
- (setcar (nthcdr 6 entry) old-total)))))
+ (when garticles
+ (string-match "/\\([0-9]+\\).html" href)
+ (setq topic (string-to-number (match-string 1 href)))
+ (if (setq tinfo (assq topic topics))
+ (progn
+ (setq old-max (cadr tinfo))
+ (setcar (cdr tinfo) garticles))
+ (setq old-max 0)
+ (push (list topic garticles subject href) topics)
+ (setcar (nthcdr 4 entry) topics))
+ (when (not (= old-max garticles))
+ (setq inc (- garticles old-max))
+ (setq mapping (nconc mapping
+ (list
+ (list
+ old-total (1- (incf old-total inc))
+ topic (1+ old-max)))))
+ (incf old-max inc)
+ (setcar (nthcdr 5 entry) mapping)
+ (setcar (nthcdr 6 entry) old-total))))))