[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master b720f1a 1/2: Refactor message-goto-body
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master b720f1a 1/2: Refactor message-goto-body |
Date: |
Thu, 26 Jan 2017 20:12:45 +0000 (UTC) |
branch: master
commit b720f1a33636b3764ef82bdb6d69e2d627304fea
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Refactor message-goto-body
* lisp/gnus/message.el (message-goto-body-1): Refactor out for reuse.
---
lisp/gnus/message.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 043ebbc..ce0d976 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 ()