From: Lars Ingebrigtsen Date: Thu, 26 Jan 2017 20:04:00 +0000 (+0100) Subject: Refactor message-goto-body X-Git-Tag: emacs-26.0.90~870^2~36 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b720f1a33636b3764ef82bdb6d69e2d627304fea;p=emacs.git Refactor message-goto-body * lisp/gnus/message.el (message-goto-body-1): Refactor out for reuse. --- diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 043ebbc579b..ce0d9769a5a 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -3108,6 +3108,9 @@ M-RET `message-newline-and-reformat' (break the line and reformat)." (looking-at "[ \t]*\n")) (expand-abbrev)) (push-mark) + (message-goto-body-1)) + +(defun message-goto-body-1 () (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))) @@ -3116,9 +3119,7 @@ M-RET `message-newline-and-reformat' (break the line and reformat)." "Return t if point is in the message 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)) + (message-goto-body-1) (point)))) (defun message-goto-eoh ()