*** empty log message ***
[gnus] / lisp / nnvirtual.el
index 5875426..974ad98 100644 (file)
@@ -66,19 +66,16 @@ virtual group.")
 to virtual article number.")
 
 (defvoo nnvirtual-mapping-offsets nil
-  "Table indexed by component group to an offset to be applied to article
-numbers in that group.")
+  "Table indexed by component group to an offset to be applied to article numbers in that group.")
 
 (defvoo nnvirtual-mapping-len 0
   "Number of articles in this virtual group.")
 
 (defvoo nnvirtual-mapping-reads nil
-  "Compressed sequence of read articles on the virtual group as computed
-from the unread status of individual component groups.")
+  "Compressed sequence of read articles on the virtual group as computed from the unread status of individual component groups.")
 
 (defvoo nnvirtual-mapping-marks nil
-  "Compressed marks alist for the virtual group as computed from the
-marks of individual component groups.")
+  "Compressed marks alist for the virtual group as computed from the marks of individual component groups.")
 
 (defvoo nnvirtual-status-string "")
 
@@ -339,8 +336,7 @@ marks of individual component groups.")
 
 
 (defun nnvirtual-update-xref-header (group article prefix system-name)
-  "Edit current NOV header in current buffer to have an xref to the
-component group, and also server prefix any existing xref lines."
+  "Edit current NOV header in current buffer to have an xref to the component group, and also server prefix any existing xref lines."
   ;; Move to beginning of Xref field, creating a slot if needed.
   (beginning-of-line)
   (looking-at
@@ -512,8 +508,7 @@ If UPDATE-P is not nil, call gnus-group-update-group on the components."
 ;;; unique reverse mapping.
 
 (defun nnvirtual-map-article (article)
-  "Return a cons of the component group and article corresponding to
-the given virtual ARTICLE."
+  "Return a cons of the component group and article corresponding to the given virtual ARTICLE."
   (let ((table nnvirtual-mapping-table)
        entry group-pos)
     (while (and table
@@ -534,8 +529,7 @@ the given virtual ARTICLE."
 
 
 (defun nnvirtual-reverse-map-article (group article)
-  "Return the virtual article number corresponding to the given
-component GROUP and ARTICLE."
+  "Return the virtual article number corresponding to the given component GROUP and ARTICLE."
   (let ((table nnvirtual-mapping-table)
        (group-pos 0)
        entry)
@@ -584,11 +578,12 @@ then it is left out of the result."
 
 
 (defun nnvirtual-partition-sequence (articles)
-  "Return an association list of component article numbers, 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."
+  "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 (lambda (g) (list g))
@@ -611,9 +606,9 @@ no corresponding component article, then it is left out of the result."
 
 
 (defun nnvirtual-create-mapping ()
-  "Build the tables necessary to map between component (group, article)
-to virtual article.  Generate the set of read messages and marks for
-the virtual group based on the marks on the component groups."
+  "Build the tables necessary to map between component (group, article) to virtual article.  
+Generate the set of read messages and marks for the virtual group
+based on the marks on the component groups."
   (let ((cnt 0)
        (tot 0)
        (M 0)
@@ -632,7 +627,7 @@ the virtual group based on the marks on the component groups."
            (setq active (gnus-activate-group g)
                  min (car active)
                  max (cdr active))
-           (when (and active (>= max min))
+           (when (and active (>= max min) (not (zerop max)))
              ;; store active information
              (push (list g (- max min -1) max) actives)
              ;; collect unread/mark info for later