Function: mh-header-field-delete

mh-header-field-delete is a byte-compiled function defined in mh-identity.el.gz.

Signature

(mh-header-field-delete FIELD VALUE-ONLY)

Documentation

Delete header FIELD, or only its value if VALUE-ONLY is t.

Return t if anything is deleted.

Source Code

;; Defined in /usr/src/emacs/lisp/mh-e/mh-identity.el.gz
(defun mh-header-field-delete (field value-only)
  "Delete header FIELD, or only its value if VALUE-ONLY is t.
Return t if anything is deleted."
  (let ((field-colon (if (string-match "^.*:$" field)
                         field
                       (concat field ":"))))
    (when (mh-goto-header-field field-colon)
      (if (not value-only)
          (beginning-of-line)
        (forward-char))
      (delete-region (point)
                     (progn (mh-header-field-end)
                            (if (not value-only) (forward-char 1))
                            (point)))
      t)))