Function: mail-header

mail-header is a byte-compiled function defined in mailheader.el.gz.

Signature

(mail-header HEADER &optional HEADER-ALIST)

Documentation

Return the value associated with header HEADER in HEADER-ALIST.

If the value is a string, it is the original value of the header. If the value is a list, its first element is the original value of the header, with any subsequent elements being the result of parsing the value.

Source Code

;; Defined in /usr/src/emacs/lisp/mail/mailheader.el.gz
;; Advertised part of the interface; see mail-header, mail-header-set.

(defun mail-header (header &optional header-alist)
  "Return the value associated with header HEADER in HEADER-ALIST.
If the value is a string, it is the original value of the header.  If the
value is a list, its first element is the original value of the header,
with any subsequent elements being the result of parsing the value."
  (declare (gv-setter (lambda (value)
                        `(mail-header-set ,header ,value ,header-alist))))
  (with-suppressed-warnings ((lexical headers)) (defvar headers))
  (cdr (assq header (or header-alist headers))))