Function: gnus-treat-article

gnus-treat-article is an autoloaded and byte-compiled function defined in gnus-art.el.gz.

Signature

(gnus-treat-article CONDITION &optional PART-NUM TOTAL TYPE)

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-art.el.gz
(defun gnus-treat-article (condition
			   &optional part-num total type)
  (let ((gnus-treat-condition condition)
        (gnus-treat-part-number part-num)
        (gnus-treat-total-parts total)
        (gnus-treat-type type)
        (gnus-treat-length (- (point-max) (point-min)))
	(alist gnus-treatment-function-alist)
	(article-goto-body-goes-to-point-min-p t)
	(treated-type
	 (or (not type)
	     (catch 'found
	       (let ((list gnus-article-treat-types))
		 (while list
		   (when (string-match (pop list) type)
		     (throw 'found t)))))))
	(highlightp (gnus-visual-p 'article-highlight 'highlight))
	val)
    (gnus-run-hooks 'gnus-part-display-hook)
    (dolist (elem alist)
      (setq val
	    (save-excursion
	      (when (gnus-buffer-live-p gnus-summary-buffer)
		(set-buffer gnus-summary-buffer))
	      (symbol-value (car elem))))
      (when (and (or (consp val)
		     treated-type)
		 (or (not gnus-inhibit-article-treatments)
		     (eq gnus-treat-condition 'head))
		 (gnus-treat-predicate val)
		 (or (not (get (car elem) 'highlight))
		     highlightp))
	(save-restriction
	  (funcall (cadr elem)))))))