2012-09-17 Richard Stallman <rms@gnu.org>
+ * message.el (message-in-body-p): Don't set mark or modify buffer.
+
* mml.el (mml-attach-file): Doc fix.
(mml-attach-external, mml-attach-buffer, mml-attach-file):
Set mail-encode-mml when in Mail mode.
(defun message-in-body-p ()
"Return t if point is in the message body."
- (let ((body (save-excursion (message-goto-body))))
- (>= (point) body)))
+ (>= (point)
+ (save-excursion
+ (goto-char (point-min))
+ (or (search-forward (concat "\n" mail-header-separator "\n") nil t)
+ (search-forward-regexp "[^:]+:\\([^\n]\\|\n[ \t]\\)+\n\n" nil t))
+ (point))))
(defun message-goto-eoh ()
"Move point to the end of the headers."