Function: nnatom--read-parts

nnatom--read-parts is a byte-compiled function defined in nnatom.el.gz.

Signature

(nnatom--read-parts ARTICLE)

Documentation

Return all parts contained in ARTICLE, or an empty HTML part with links.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/nnatom.el.gz
(defun nnatom--read-parts (article)
  "Return all parts contained in ARTICLE, or an empty HTML part with links."
  (let* ((summary (dom-child-by-tag article 'summary))
         (stype (cdr (assq 'type (dom-attributes summary))))
         (summary (nnatom--read-part summary stype))
         (content (dom-child-by-tag article 'content))
         (ctype (cdr (assq 'type (dom-attributes content))))
         (content (nnatom--read-part content ctype))
         (st (string= stype ctype))
         parts)
    (cond ((and summary content)
           (and st (push summary parts))
           (push (append content '(links)) parts)
           (or st (push summary parts)))
          ((setq content (or summary content))
           (push (append content '(links)) parts))
          (t (push '((nil (Content-Type . "text/html") links)) parts)))
    parts))