Function: mail-hist-current-header-name

mail-hist-current-header-name is a byte-compiled function defined in mail-hist.el.gz.

Signature

(mail-hist-current-header-name)

Documentation

Get name of mail header point is currently in, without the colon.

Returns nil if not in a header, implying that point is in the body of the message.

Source Code

;; Defined in /usr/src/emacs/lisp/mail/mail-hist.el.gz
(defsubst mail-hist-current-header-name ()
  "Get name of mail header point is currently in, without the colon.
Returns nil if not in a header, implying that point is in the body of
the message."
  (if (>= (point) (mail-text-start))
      nil ; then we are in the body of the message
    (save-excursion
      (let* ((body-start
	      (mail-text-start))
             (name-start
              (re-search-backward mail-hist-header-regexp nil t))
             (name-end
              (prog2 (search-forward ":" body-start t) (1- (point)))))
        (and
         name-start
         name-end
         (downcase (buffer-substring-no-properties name-start name-end)))))))