Function: nnvirtual-partition-sequence
nnvirtual-partition-sequence is a byte-compiled function defined in
nnvirtual.el.gz.
Signature
(nnvirtual-partition-sequence ARTICLES)
Documentation
Return an association list of component article numbers.
These are indexed by elements of nnvirtual-component-groups, based on
the sequence ARTICLES of virtual article numbers. ARTICLES should be
sorted, and can be a compressed sequence. If any of the article
numbers has no corresponding component article, then it is left out of
the result.
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/nnvirtual.el.gz
(defun nnvirtual-partition-sequence (articles)
"Return an association list of component article numbers.
These are indexed by elements of `nnvirtual-component-groups', based on
the sequence ARTICLES of virtual article numbers. ARTICLES should be
sorted, and can be a compressed sequence. If any of the article
numbers has no corresponding component article, then it is left out of
the result."
(when (numberp (cdr-safe articles))
(setq articles (list articles)))
(let ((carticles (mapcar #'list nnvirtual-component-groups))
a i j article entry)
(while (setq a (pop articles))
(if (atom a)
(setq i a
j a)
(setq i (car a)
j (cdr a)))
(while (<= i j)
(when (setq article (nnvirtual-map-article i))
(setq entry (assoc (car article) carticles))
(setcdr entry (cons (cdr article) (cdr entry))))
(setq i (1+ i))))
(mapc (lambda (x) (setcdr x (nreverse (cdr x))))
carticles)
carticles))