Function: newsticker--stat-num-items

newsticker--stat-num-items is a byte-compiled function defined in newst-backend.el.gz.

Signature

(newsticker--stat-num-items FEED &rest AGES)

Documentation

Return number of items in the given FEED which have one of the given AGES.

If AGES is nil, the total number of items is returned.

Source Code

;; Defined in /usr/src/emacs/lisp/net/newst-backend.el.gz
;; ======================================================================
;;; Statistics
;; ======================================================================
(defun newsticker--stat-num-items (feed &rest ages)
  "Return number of items in the given FEED which have one of the given AGES.
If AGES is nil, the total number of items is returned."
  (let ((items (cdr (newsticker--cache-get-feed feed)))
        (num 0))
    (while items
      (if ages
          (if (memq (newsticker--age (car items)) ages)
              (setq num (1+ num)))
        (if (memq (newsticker--age (car items)) '(new old immortal obsolete))
            (setq num (1+ num))))
      (setq items (cdr items)))
    num))