Function: message-remove-first-header

message-remove-first-header is a byte-compiled function defined in message.el.gz.

Signature

(message-remove-first-header HEADER)

Documentation

Remove the first instance of HEADER if there is more than one.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/message.el.gz
(defun message-remove-first-header (header)
  "Remove the first instance of HEADER if there is more than one."
  (let ((count 0)
	(regexp (concat "^" (regexp-quote header) ":")))
    (save-excursion
      (goto-char (point-min))
      (while (re-search-forward regexp nil t)
	(cl-incf count)))
    (while (> count 1)
      (message-remove-header header nil t)
      (cl-decf count))))