Add hooks for gcc handling
[gnus] / lisp / gnus-sum.el
index dfd1421..46e246f 100644 (file)
@@ -1243,13 +1243,6 @@ For example: ((1 . cn-gb-2312) (2 . big5))."
   :type 'boolean
   :group 'gnus-summary-marks)
 
-(defcustom gnus-propagate-marks nil
-  "If non-nil, Gnus will store and retrieve marks from the backends.
-This means that marks will be stored both in .newsrc.eld and in
-the backend, and will slow operation down somewhat."
-  :type 'boolean
-  :group 'gnus-summary-marks)
-
 (defcustom gnus-alter-articles-to-read-function nil
   "Function to be called to alter the list of articles to be selected."
   :type '(choice (const nil) function)
@@ -1580,6 +1573,7 @@ This list will always be a subset of gnus-newsgroup-undownloaded.")
     gnus-newsgroup-killed
     gnus-newsgroup-unseen
     gnus-newsgroup-seen
+    gnus-newsgroup-unexist
     gnus-newsgroup-cached
     gnus-newsgroup-downloadable
     gnus-newsgroup-undownloaded
@@ -5972,7 +5966,6 @@ If SELECT-ARTICLES, only select those articles from GROUP."
       (setq mark (car marks)
            mark-type (gnus-article-mark-to-type mark)
            var (intern (format "gnus-newsgroup-%s" (car (rassq mark types)))))
-
       ;; We set the variable according to the type of the marks list,
       ;; and then adjust the marks to a subset of the active articles.
       (cond
@@ -6294,10 +6287,9 @@ The resulting hash table is returned, or nil if no Xrefs were found."
         (info (nth 2 entry))
         (active (gnus-active group))
         (set-marks
-         (or gnus-propagate-marks
-             (gnus-method-option-p
-              (gnus-find-method-for-group group)
-              'server-marks)))
+         (gnus-method-option-p
+          (gnus-find-method-for-group group)
+          'server-marks))
         range)
     (if (not entry)
        ;; Group that Gnus doesn't know exists, but still allow the
@@ -10096,10 +10088,9 @@ ACTION can be either `move' (the default), `crosspost' or `copy'."
                   to-group 'expire (list to-article) info))
 
                (when (and to-marks
-                          (or gnus-propagate-marks
-                              (gnus-method-option-p
-                               (gnus-find-method-for-group to-group)
-                               'server-marks)))
+                          (gnus-method-option-p
+                           (gnus-find-method-for-group to-group)
+                           'server-marks))
                  (gnus-request-set-mark
                   to-group (list (list (list to-article) 'add to-marks)))))
 
@@ -10313,16 +10304,19 @@ This will be the case if the article has both been mailed and posted."
              'request-expire-articles gnus-newsgroup-name))
     ;; This backend supports expiry.
     (let* ((total (gnus-group-total-expirable-p gnus-newsgroup-name))
-          (expirable (if total
-                         (progn
-                           ;; We need to update the info for
-                           ;; this group for `gnus-list-of-read-articles'
-                           ;; to give us the right answer.
-                           (gnus-run-hooks 'gnus-exit-group-hook)
-                           (gnus-summary-update-info)
-                           (gnus-list-of-read-articles gnus-newsgroup-name))
-                       (setq gnus-newsgroup-expirable
-                             (sort gnus-newsgroup-expirable '<))))
+          (expirable
+           (gnus-list-range-difference
+            (if total
+                (progn
+                  ;; We need to update the info for
+                  ;; this group for `gnus-list-of-read-articles'
+                  ;; to give us the right answer.
+                  (gnus-run-hooks 'gnus-exit-group-hook)
+                  (gnus-summary-update-info)
+                  (gnus-list-of-read-articles gnus-newsgroup-name))
+              (setq gnus-newsgroup-expirable
+                    (sort gnus-newsgroup-expirable '<)))
+            gnus-newsgroup-unexist))
           (expiry-wait (if now 'immediate
                          (gnus-group-find-parameter
                           gnus-newsgroup-name 'expiry-wait)))
@@ -12581,10 +12575,9 @@ UNREAD is a sorted list."
        (save-excursion
          (let (setmarkundo)
            ;; Propagate the read marks to the backend.
-           (when (and (or gnus-propagate-marks
-                          (gnus-method-option-p
-                           (gnus-find-method-for-group group)
-                           'server-marks))
+           (when (and (gnus-method-option-p
+                       (gnus-find-method-for-group group)
+                       'server-marks)
                       (gnus-check-backend-function 'request-set-mark group))
              (let ((del (gnus-remove-from-range (gnus-info-read info) read))
                    (add (gnus-remove-from-range read (gnus-info-read info))))
@@ -12880,9 +12873,8 @@ If ALL is a number, fetch this number of articles."
                        (if initial "max" "default")
                        len)
                       nil nil
-                      (if initial
-                          (cons (number-to-string initial)
-                                0)))))
+                      (and initial
+                           (number-to-string initial)))))
                (unless (string-match "^[ \t]*$" input)
                  (setq all (string-to-number input))
                  (if (< all len)