Function: mail-header-merge

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

This function is obsolete since 28.1; use alist-get instead.

Signature

(mail-header-merge MERGE-RULES HEADERS)

Documentation

Return a new header alist with MERGE-RULES applied to HEADERS.

MERGE-RULES is an alist whose keys are header names (symbols) and whose values are forms to evaluate, the results of which are the new headers. It should be a string or a list of string. The first element may be nil to denote that the formatting functions must use the remaining elements, or skip the header altogether if there are no other elements.
  The macro mail-header can be used to access headers in HEADERS.

Source Code

;; Defined in /usr/src/emacs/lisp/mail/mailheader.el.gz
(defun mail-header-merge (merge-rules headers)
  "Return a new header alist with MERGE-RULES applied to HEADERS.
MERGE-RULES is an alist whose keys are header names (symbols) and whose
values are forms to evaluate, the results of which are the new headers.  It
should be a string or a list of string.  The first element may be nil to
denote that the formatting functions must use the remaining elements, or
skip the header altogether if there are no other elements.
  The macro `mail-header' can be used to access headers in HEADERS."
  (declare (obsolete alist-get "28.1"))
  (with-suppressed-warnings ((lexical headers)) (defvar headers))
  (let ((headers headers))
    (mapcar
     (lambda (rule)
       (cons (car rule) (eval (cdr rule) t)))
     merge-rules)))