Function: mh-mail-header-end
mh-mail-header-end is an autoloaded and byte-compiled function defined
in mh-utils.el.gz.
Signature
(mh-mail-header-end)
Documentation
Substitute for mail-header-end that doesn't widen the buffer.
In MH-E we frequently need to find the end of headers in nested messages, where the buffer has been narrowed. This function works in this situation.
Source Code
;; Defined in /usr/src/emacs/lisp/mh-e/mh-utils.el.gz
;;;###mh-autoload
(defun mh-mail-header-end ()
"Substitute for `mail-header-end' that doesn't widen the buffer.
In MH-E we frequently need to find the end of headers in nested
messages, where the buffer has been narrowed. This function works
in this situation."
(save-excursion
;; XXX: The following replaces a call to rfc822-goto-eoh. Occasionally,
;; mail headers that MH-E has to read contains lines of the form:
;; From xxx@yyy Mon May 10 11:48:07 2004
;; In this situation, rfc822-goto-eoh doesn't go to the end of the
;; header. The replacement allows From_ lines in the mail header.
(goto-char (point-min))
(cl-loop for p = (re-search-forward
"^\\([:\n]\\|[^: \t\n]+[ \t\n]\\)" nil 'move)
do (cond ((null p) (cl-return))
(t (goto-char (match-beginning 0))
(unless (looking-at "From ") (cl-return))
(goto-char p))))
(point)))