]> git.eshelyaron.com Git - emacs.git/commitdiff
Refactor message-goto-body
authorLars Ingebrigtsen <larsi@gnus.org>
Thu, 26 Jan 2017 20:04:00 +0000 (21:04 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 26 Jan 2017 20:04:00 +0000 (21:04 +0100)
* lisp/gnus/message.el (message-goto-body-1): Refactor out for reuse.

lisp/gnus/message.el

index 043ebbc579b6183a6701abf2989e49868ac828cc..ce0d9769a5aa5a95829c198e56276d712ddb079c 100644 (file)
@@ -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 ()