Synch to No Gnus 200402140029.
[elisp/gnus.git-] / lisp / gnus-sum.el
index ba3896f..4bcb038 100644 (file)
@@ -1212,7 +1212,6 @@ the normal Gnus MIME machinery."
     (?\< (make-string (max 0 (- 20 gnus-tmp-level)) ? ) ?s)
     (?i gnus-tmp-score ?d)
     (?z gnus-tmp-score-char ?c)
-    (?l (bbb-grouplens-score gnus-tmp-header) ?s)
     (?V (gnus-thread-total-score (and (boundp 'thread) (car thread))) ?d)
     (?U gnus-tmp-unread ?c)
     (?f (gnus-summary-from-or-to-or-newsgroups gnus-tmp-header gnus-tmp-from)
@@ -5360,7 +5359,7 @@ If SELECT-ARTICLES, only select those articles from GROUP."
         (min (car active))
         (max (cdr active))
         (types gnus-article-mark-lists)
-        marks var articles article mark mark-type p-articles
+        marks var articles article mark mark-type
          bgn end)
 
     (dolist (marks marked-lists)
@@ -5374,35 +5373,27 @@ If SELECT-ARTICLES, only select those articles from GROUP."
        ;; Adjust "simple" lists - compressed yet unsorted
        ((eq mark-type 'list)
         ;; Simultaneously uncompress and clip to active range
-        (setq p-articles marks
-              articles (cdr p-articles))
-        (while (setq article (car articles))
-          (when (cond ((consp article)
-                       (setq bgn (max (car article) min)
-                             end (min (cdr article) max))
-                       (if (> bgn end)
-                           t    ; range excluded - splice out of marks
-                         (setcar articles bgn) ; First value replaces range.
-                         (setq bgn (1+ bgn))
-                         (while (<= bgn end)
-                           (setq articles (setcdr articles (cons bgn (cdr articles)))
-                                 bgn (1+ bgn)))
-                         (setq p-articles articles
-                               articles (cdr articles))
-                         nil))
-                      ((or (< article min)
-                           (> article max))
-                       t        ; value excluded - splice out of marks
-                       )
-                      (t
-                       (setq p-articles articles
-                             articles (cdr articles))
-                       nil))
-            ;; perform slice to remove article
-            (if (setcar articles (cadr articles))
-                (setcdr articles (cddr articles))
-              (setcdr p-articles nil))))
-        (set var (cdr marks)))
+        ;; See gnus-uncompress-range for a description of possible marks
+        (let (l lh)
+          (if (not (cadr marks))
+              (set var nil)
+            (setq articles (if (numberp (cddr marks))
+                               (list (cdr marks))
+                             (cdr marks))
+                  lh (cons nil nil)
+                  l lh)
+
+            (while (setq article (pop articles))
+              (cond ((consp article)
+                     (setq bgn (max (car article) min)
+                           end (min (cdr article) max))
+                     (while (<= bgn end)
+                       (setq l (setcdr l (cons bgn nil))
+                             bgn (1+ bgn))))
+                    ((and (<= min article)
+                          (>= max article))
+                     (setq l (setcdr l (cons article nil))))))
+            (set var (cdr lh)))))
        ;; Adjust assocs.
        ((eq mark-type 'tuple)
        (set var (setq articles (cdr marks)))
@@ -7603,10 +7594,9 @@ articles that are younger than AGE days."
        (if (numberp days)
           (progn
             (setq days-got t)
-            (if (< days 0)
-                (progn
-                  (setq younger (not younger))
-                  (setq days (* days -1)))))
+            (when (< days 0)
+              (setq younger (not younger))
+              (setq days (* days -1))))
         (message "Please enter a number.")
         (sleep-for 1)))
      (list days younger)))
@@ -8047,13 +8037,12 @@ fetch-old-headers verbiage, and so on."
            (and gnus-newsgroup-display
                 (not (funcall gnus-newsgroup-display)))
            ;; Check NoCeM things.
-           (if (and gnus-use-nocem
-                    (gnus-nocem-unwanted-article-p
-                     (mail-header-id (car thread))))
-               (progn
-                 (setq gnus-newsgroup-unreads
-                       (delq number gnus-newsgroup-unreads))
-                 t))))
+           (when (and gnus-use-nocem
+                      (gnus-nocem-unwanted-article-p
+                       (mail-header-id (car thread))))
+             (setq gnus-newsgroup-unreads
+                   (delq number gnus-newsgroup-unreads))
+             t)))
          ;; Nope, invisible article.
          0
        ;; Ok, this article is to be visible, so we add it to the limit