aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2017-01-26 21:04:00 +0100
committerLars Ingebrigtsen2017-01-26 21:04:00 +0100
commitb720f1a33636b3764ef82bdb6d69e2d627304fea (patch)
treecb1d5bb4e9671b8c8b96e8f46b1838b4fc8d4b8d
parentaeecbc09adc46d6a681ed30609ff23cb1c37204b (diff)
downloademacs-b720f1a33636b3764ef82bdb6d69e2d627304fea.tar.gz
emacs-b720f1a33636b3764ef82bdb6d69e2d627304fea.zip
Refactor message-goto-body
* lisp/gnus/message.el (message-goto-body-1): Refactor out for reuse.
-rw-r--r--lisp/gnus/message.el7
1 files changed, 4 insertions, 3 deletions
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)."
3108 (looking-at "[ \t]*\n")) 3108 (looking-at "[ \t]*\n"))
3109 (expand-abbrev)) 3109 (expand-abbrev))
3110 (push-mark) 3110 (push-mark)
3111 (message-goto-body-1))
3112
3113(defun message-goto-body-1 ()
3111 (goto-char (point-min)) 3114 (goto-char (point-min))
3112 (or (search-forward (concat "\n" mail-header-separator "\n") nil t) 3115 (or (search-forward (concat "\n" mail-header-separator "\n") nil t)
3113 (search-forward-regexp "[^:]+:\\([^\n]\\|\n[ \t]\\)+\n\n" nil t))) 3116 (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)."
3116 "Return t if point is in the message body." 3119 "Return t if point is in the message body."
3117 (>= (point) 3120 (>= (point)
3118 (save-excursion 3121 (save-excursion
3119 (goto-char (point-min)) 3122 (message-goto-body-1)
3120 (or (search-forward (concat "\n" mail-header-separator "\n") nil t)
3121 (search-forward-regexp "[^:]+:\\([^\n]\\|\n[ \t]\\)+\n\n" nil t))
3122 (point)))) 3123 (point))))
3123 3124
3124(defun message-goto-eoh () 3125(defun message-goto-eoh ()