Function: gnus-article-highlight-headers

gnus-article-highlight-headers is an autoloaded, interactive and byte-compiled function defined in gnus-art.el.gz.

Signature

(gnus-article-highlight-headers)

Documentation

Highlight article headers as specified by gnus-header-face-alist.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-art.el.gz
(defun gnus-article-highlight-headers ()
  "Highlight article headers as specified by `gnus-header-face-alist'."
  (interactive nil gnus-article-mode gnus-summary-mode)
  (gnus-with-article-headers
    (let (regexp header-face field-face from hpoints fpoints)
      (dolist (entry gnus-header-face-alist)
	(goto-char (point-min))
	(setq regexp (concat "^\\("
			     (if (string-equal "" (nth 0 entry))
				 "[^\t ]"
			       (nth 0 entry))
			     "\\)")
	      header-face (nth 1 entry)
	      field-face (nth 2 entry))
	(while (and (re-search-forward regexp nil t)
		    (not (eobp)))
	  (beginning-of-line)
	  (setq from (point))
	  (unless (search-forward ":" nil t)
	    (forward-char 1))
	  (when (and header-face
		     (not (memq (point) hpoints)))
	    (push (point) hpoints)
	    (put-text-property from (point) 'face header-face))
	  (when (and field-face
		     (not (memq (setq from (point)) fpoints)))
	    (push from fpoints)
	    (if (re-search-forward "^[^ \t]" nil t)
		(forward-char -2)
	      (goto-char (point-max)))
	    (put-text-property from (point) 'face field-face)))))))