X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fgnus-sum.el;h=a1fe9b7f284b00bf531e9c5b0a3345777c64557b;hb=eb8a724d7b1eac8b9c7dd28ceef1cfac3fe93d88;hp=d5311100b7916f487788c5cd765cf41c24eb8757;hpb=821164edf75ca4b9f49b03bb42b7d6cd73926787;p=elisp%2Fgnus.git- diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index d531110..a1fe9b7 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -4556,7 +4556,7 @@ If SELECT-ARTICLES, only select those articles from GROUP." (setq gnus-newsgroup-display (cond ((eq gnus-newsgroup-display 'all) - (setq gnus-newsgroup-display 'identity)) + 'all) ((arrayp gnus-newsgroup-display) (gnus-summary-display-make-predicate (mapcar 'identity gnus-newsgroup-display))) @@ -4581,7 +4581,7 @@ If SELECT-ARTICLES, only select those articles from GROUP." ;; Adjust and set lists of article marks. (when info (gnus-adjust-marked-articles info)) - + (if (setq articles select-articles) (setq gnus-newsgroup-unselected (gnus-sorted-intersection @@ -4821,6 +4821,11 @@ If SELECT-ARTICLES, only select those articles from GROUP." (setq marks (cdr marks))) out)) +(defun gnus-article-mark-to-type (mark) + "Return the type of MARK." + (or (cadr (assq mark gnus-article-special-mark-lists)) + 'list)) + (defun gnus-adjust-marked-articles (info) "Set all article lists and remove all marks that are no longer valid." (let* ((marked-lists (gnus-info-marks info)) @@ -4828,56 +4833,53 @@ If SELECT-ARTICLES, only select those articles from GROUP." (min (car active)) (max (cdr active)) (types gnus-article-mark-lists) - (uncompressed '(score bookmark killed)) - marks var articles article mark) + marks var articles article mark mark-type) (dolist (marks marked-lists) - (setq mark (car marks)) - (unless (eq mark 'seen) - ;; Do the rest of the marks. - (set (setq var (intern (format "gnus-newsgroup-%s" - (car (rassq mark types))))) - (cond - ((memq mark uncompressed) - (cdr marks)) - (t - (gnus-uncompress-range (cdr marks))))) - - (setq articles (symbol-value var)) + (setq mark (car marks) + mark-type (gnus-article-mark-to-type mark) + var (intern (format "gnus-newsgroup-%s" (car (rassq mark types))))) - ;; All articles have to be subsets of the active articles. - (cond - ;; Adjust "simple" lists. - ((memq mark '(tick dormant expire reply save)) + ;; 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 + ;; Adjust "simple" lists. + ((eq mark-type 'list) + (set var (setq articles (gnus-uncompress-range (cdr marks)))) + (when (memq mark '(tick dormant expire reply save)) (while articles (when (or (< (setq article (pop articles)) min) (> article max)) - (set var (delq article (symbol-value var)))))) - ;; Adjust assocs. - ((memq mark uncompressed) - (when (not (listp (cdr (symbol-value var)))) - (set var (list (symbol-value var)))) - (when (not (listp (cdr articles))) - (setq articles (list articles))) - (while articles - (when (or (not (consp (setq article (pop articles)))) - (< (car article) min) - (> (car article) max)) - (set var (delq article (symbol-value var))))))))))) + (set var (delq article (symbol-value var))))))) + ;; Adjust assocs. + ((eq mark-type 'tuple) + (set var (setq articles (cdr marks))) + (when (not (listp (cdr (symbol-value var)))) + (set var (list (symbol-value var)))) + (when (not (listp (cdr articles))) + (setq articles (list articles))) + (while articles + (when (or (not (consp (setq article (pop articles)))) + (< (car article) min) + (> (car article) max)) + (set var (delq article (symbol-value var)))))) + ((eq mark-type 'range) + (cond + ((eq mark 'seen)))))))) (defun gnus-update-missing-marks (missing) "Go through the list of MISSING articles and remove them from the mark lists." (when missing - (let ((types gnus-article-mark-lists) - var m) + (let (var m) ;; Go through all types. - (while types - (setq var (intern (format "gnus-newsgroup-%s" (car (pop types))))) - (when (symbol-value var) - ;; This list has articles. So we delete all missing articles - ;; from it. - (setq m missing) - (while m - (set var (delq (pop m) (symbol-value var))))))))) + (dolist (elem gnus-article-mark-lists) + (when (eq (gnus-article-mark-to-type (cdr elem)) 'list) + (setq var (intern (format "gnus-newsgroup-%s" (car elem)))) + (when (symbol-value var) + ;; This list has articles. So we delete all missing + ;; articles from it. + (setq m missing) + (while m + (set var (delq (pop m) (symbol-value var)))))))))) (defun gnus-update-marks () "Enter the various lists of marked articles into the newsgroup info list." @@ -4910,7 +4912,7 @@ If SELECT-ARTICLES, only select those articles from GROUP." (setq list (cdr all))))) (when (eq (cdr type) 'seen) - (setq list + (setq list (if list (gnus-add-to-range list gnus-newsgroup-unseen) (gnus-compress-sequence gnus-newsgroup-articles)))) @@ -7164,7 +7166,7 @@ fetch-old-headers verbiage, and so on." ;; Most groups have nothing to remove. (if (or gnus-inhibit-limiting (and (null gnus-newsgroup-dormant) - (eq gnus-newsgroup-display 'identity) + (eq gnus-newsgroup-display 'all) (not (eq gnus-fetch-old-headers 'some)) (not (numberp gnus-fetch-old-headers)) (not (eq gnus-fetch-old-headers 'invisible)) @@ -7255,6 +7257,7 @@ fetch-old-headers verbiage, and so on." t) ;; Do the `display' group parameter. (and gnus-newsgroup-display + (not (eq gnus-newsgroup-display 'all)) (not (funcall gnus-newsgroup-display))) ;; Check NoCeM things. (if (and gnus-use-nocem