Returns nil if not in a header, implying that point is in the body of
the message."
(if (save-excursion
- (re-search-backward (concat "^" mail-header-separator) nil t))
+ (re-search-backward (concat "^" (regexp-quote mail-header-separator))
+ nil t))
nil ; then we are in the body of the message
(save-excursion
(let* ((body-start ; limit possibility of false headers
(save-excursion
- (re-search-forward (concat "^" mail-header-separator) nil t)))
+ (re-search-forward
+ (concat "^" (regexp-quote mail-header-separator))
+ nil t)))
(name-start
(re-search-backward mail-hist-header-regexp nil t))
(name-end
colon after the header name, or on the second space following that if
the header is empty."
(let ((boundary (save-excursion
- (re-search-forward (concat "^" mail-header-separator) nil t))))
+ (re-search-forward
+ (concat "^" (regexp-quote mail-header-separator))
+ nil t))))
(and
boundary
(let ((unstopped t))
(mail-hist-beginning-of-header)
(let ((start (point)))
(or (mail-hist-forward-header 1)
- (re-search-forward (concat "^" mail-header-separator)))
+ (re-search-forward
+ (concat "^" (regexp-quote mail-header-separator))))
(beginning-of-line)
(buffer-substring start (1- (point))))))
(let ((body-contents
(save-excursion
(goto-char (point-min))
- (re-search-forward (concat "^" mail-header-separator) nil)
+ (re-search-forward
+ (concat "^" (regexp-quote mail-header-separator))
+ nil)
(forward-line 1)
(buffer-substring (point) (point-max)))))
(mail-hist-add-header-contents-to-ring "body" body-contents)))))