Function: nnatom--read-article
nnatom--read-article is a byte-compiled function defined in
nnatom.el.gz.
Signature
(nnatom--read-article DATA _)
Documentation
Return the next article and the remaining DATA in a cons cell, or nil.
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/nnatom.el.gz
(defun nnatom--read-article (data _)
"Return the next article and the remaining DATA in a cons cell, or nil."
(when (eq (car data) 'feed) (setq data (dom-children data)))
;; Discard any children between/after entries.
(while (and data (not (eq (car-safe (car data)) 'entry))) (pop data))
(when-let* ((article (car data))
(auths (list 'authors)) (links (list 'links)))
(dom-add-child-before article links)
(dom-add-child-before article auths)
(dolist (child (cddddr article) `(,article . ,(cdr data)))
(pcase (car-safe child) ; Authors and links can appear
((or 'author 'contributor) ; anywhere in the entry so we
(dom-add-child-before auths child) ; collect them all here to
(dom-add-child-before links child)) ; avoid looping over the
((or 'link ; entry multiple times later.
(and 'content (guard (assq 'src (dom-attributes child)))))
(dom-add-child-before links child))))))