Function: message-goto-body

message-goto-body is an interactive and byte-compiled function defined in message.el.gz.

Signature

(message-goto-body &optional INTERACTIVE)

Documentation

Move point to the beginning of the message body.

Returns point.

Key Bindings

Aliases

message-goto-body-1 (obsolete since 27.1)

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/message.el.gz
(defun message-goto-body (&optional interactive)
  "Move point to the beginning of the message body.
Returns point."
  (interactive "p" message-mode)
  (when interactive
    (when (looking-at "[ \t]*\n")
    (expand-abbrev))
    (push-mark))
  (goto-char (point-min))
  (or (search-forward (concat "\n" mail-header-separator "\n") nil t)
      ;; If the message is mangled, find the end of the headers the
      ;; hard way.
      (progn
	;; Skip past all headers and continuation lines.
	(while (looking-at "[^\t\n :]+:\\|[\t ]+[^\t\n ]")
	  (forward-line 1))
	;; We're now at the first empty line, so perhaps move past it.
	(when (and (eolp)
		   (not (eobp)))
	  (forward-line 1))
	(point))))