Function: mh-header-field-font-lock

mh-header-field-font-lock is a byte-compiled function defined in mh-show.el.gz.

Signature

(mh-header-field-font-lock FIELD LIMIT)

Documentation

Return the value of a header field FIELD to font-lock.

Argument LIMIT limits search.

Source Code

;; Defined in /usr/src/emacs/lisp/mh-e/mh-show.el.gz
;;; MH-Show Font Lock

(defun mh-header-field-font-lock (field limit)
  "Return the value of a header field FIELD to font-lock.
Argument LIMIT limits search."
  (if (= (point) limit)
      nil
    (let* ((mail-header-end (mh-mail-header-end))
           (lesser-limit (if (< mail-header-end limit) mail-header-end limit))
           (case-fold-search t))
      (when (and (< (point) mail-header-end) ;Only within header
                 (re-search-forward (format "^%s" field) lesser-limit t))
        (let ((match-one-b (match-beginning 0))
              (match-one-e (match-end 0)))
          (mh-header-field-end)
          (if (> (point) limit)         ;Don't search for end beyond limit
              (goto-char limit))
          (set-match-data (list match-one-b match-one-e
                                (1+ match-one-e) (point)))
          t)))))