Function: feedmail-accume-n-nuke-header
feedmail-accume-n-nuke-header is a byte-compiled function defined in
feedmail.el.gz.
Signature
(feedmail-accume-n-nuke-header HEADER-END HEADER-REGEXP)
Documentation
Delete headers matching a regexp and their continuation lines.
There may be multiple such lines, and each may have arbitrarily many continuation lines. Return an accumulation of the deleted headers, including the intervening newlines.
Source Code
;; Defined in /usr/src/emacs/lisp/mail/feedmail.el.gz
(nth 3 fp))))))) ; folding
(defun feedmail-accume-n-nuke-header (header-end header-regexp)
"Delete headers matching a regexp and their continuation lines.
There may be multiple such lines, and each may have arbitrarily
many continuation lines. Return an accumulation of the deleted
headers, including the intervening newlines."
(feedmail-say-debug ">in-> feedmail-accume-n-nuke-header %s %s"
header-end header-regexp)
(let ((case-fold-search t) (dropout))
(save-excursion
(goto-char (point-min))
;; iterate over all matching lines
(while (re-search-forward header-regexp header-end t)
(forward-line 1)
(setq dropout (concat dropout (buffer-substring-no-properties (match-beginning 0) (point))))
(delete-region (match-beginning 0) (point))
;; get rid of any continuation lines
(while (and (looking-at "^[ \t].*\n") (< (point) header-end))
(forward-line 1)
(setq dropout (concat dropout (buffer-substring-no-properties (match-beginning 0) (point))))
(replace-match ""))))
(identity dropout)))