Function: mh-modify-header-field
mh-modify-header-field is a byte-compiled function defined in
mh-comp.el.gz.
Signature
(mh-modify-header-field FIELD VALUE &optional OVERWRITE-FLAG)
Documentation
To header FIELD add VALUE.
If OVERWRITE-FLAG is non-nil then the old value, if present, is discarded.
Source Code
;; Defined in /usr/src/emacs/lisp/mh-e/mh-comp.el.gz
(defun mh-modify-header-field (field value &optional overwrite-flag)
"To header FIELD add VALUE.
If OVERWRITE-FLAG is non-nil then the old value, if present, is
discarded."
(cond ((and overwrite-flag
(mh-goto-header-field (concat field ":")))
(insert " " value)
(delete-region (point) (line-end-position)))
((and (not overwrite-flag)
(mh-regexp-in-field-p (concat "\\b" (regexp-quote value) "\\b") field))
;; Already there, do nothing.
)
((and (not overwrite-flag)
(mh-goto-header-field (concat field ":")))
(insert " " value ","))
(t
(mh-goto-header-end 0)
(insert field ": " value "\n"))))