Function: rmail-delete-unwanted-fields
rmail-delete-unwanted-fields is a byte-compiled function defined in
rmailout.el.gz.
Signature
(rmail-delete-unwanted-fields PRESERVE)
Documentation
Delete all headers matching rmail-fields-not-to-output.
Retains headers matching the regexp PRESERVE. Ignores case. The buffer should be narrowed to just the header.
Source Code
;; Defined in /usr/src/emacs/lisp/mail/rmailout.el.gz
(defun rmail-delete-unwanted-fields (preserve)
"Delete all headers matching `rmail-fields-not-to-output'.
Retains headers matching the regexp PRESERVE. Ignores case.
The buffer should be narrowed to just the header."
(if rmail-fields-not-to-output
(save-excursion
(goto-char (point-min))
(let ((case-fold-search t))
(while (re-search-forward rmail-fields-not-to-output nil t)
(beginning-of-line)
(unless (looking-at preserve)
(delete-region (point) (line-beginning-position 2))))))))