Function: gnus-summary-limit-children
gnus-summary-limit-children is a byte-compiled function defined in
gnus-sum.el.gz.
Signature
(gnus-summary-limit-children THREAD)
Documentation
Return 1 if this subthread is visible and 0 if it is not.
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-sum.el.gz
(defun gnus-summary-limit-children (thread)
"Return 1 if this subthread is visible and 0 if it is not."
;; First we get the number of visible children to this thread. This
;; is done by recursing down the thread using this function, so this
;; will really go down to a leaf article first, before slowly
;; working its way up towards the root.
(when thread
(let* ((max-lisp-eval-depth (max 5000 max-lisp-eval-depth))
(children
(if (cdr thread)
(apply #'+ (mapcar #'gnus-summary-limit-children
(cdr thread)))
0))
(number (mail-header-number (car thread)))
score)
(if (and
(not (memq number gnus-newsgroup-marked))
(or
;; If this article is dormant and has absolutely no visible
;; children, then this article isn't visible.
(and (memq number gnus-newsgroup-dormant)
(zerop children))
;; If this is "fetch-old-headered" and there is no
;; visible children, then we don't want this article.
(and (or (eq gnus-fetch-old-headers 'some)
(numberp gnus-fetch-old-headers))
(gnus-summary-article-ancient-p number)
(zerop children))
;; If this is "fetch-old-headered" and `invisible', then
;; we don't want this article.
(and (eq gnus-fetch-old-headers 'invisible)
(gnus-summary-article-ancient-p number))
;; If this is a sparsely inserted article with no children,
;; we don't want it.
(and (eq gnus-build-sparse-threads 'some)
(gnus-summary-article-sparse-p number)
(zerop children))
;; If we use expunging, and this article is really
;; low-scored, then we don't want this article.
(when (and gnus-summary-expunge-below
(< (setq score
(or (cdr (assq number gnus-newsgroup-scored))
gnus-summary-default-score))
gnus-summary-expunge-below))
;; We increase the expunge-tally here, but that has
;; nothing to do with the limits, really.
(incf gnus-newsgroup-expunged-tally)
;; We also mark as read here, if that's wanted.
(when (and gnus-summary-mark-below
(< score gnus-summary-mark-below))
(setq gnus-newsgroup-unreads
(delq number gnus-newsgroup-unreads))
(if gnus-newsgroup-auto-expire
(push number gnus-newsgroup-expirable)
(push (cons number gnus-low-score-mark)
gnus-newsgroup-reads)))
t)
;; Do the `display' group parameter.
(and gnus-newsgroup-display
(let ((gnus-number number))
(not (funcall gnus-newsgroup-display))))))
;; Nope, invisible article.
0
;; Ok, this article is to be visible, so we add it to the limit
;; and return 1.
(push number gnus-newsgroup-limit)
1))))