diff options
Diffstat (limited to 'git-email.el')
-rw-r--r-- | git-email.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/git-email.el b/git-email.el index 0539dc2..f510d30 100644 --- a/git-email.el +++ b/git-email.el @@ -207,11 +207,12 @@ them into the message buffer." (diff (git-email--extract-diff patch-file))) (funcall git-email-compose-email-function to (cadr (assoc "subject" used-headers)) used-headers) - ;; (let ((body (or (re-search-forward "<#part .*>") - ;; (re-search-forward "--text follows this line--")))) - (goto-char (point-max)) - (save-excursion - (insert diff)) + (goto-char (point-min)) + (let ((body (or (re-search-forward "<#part \\(encrypt\\|sign\\)=.*mime>" nil t) + (re-search-forward "--text follows this line--" nil t)))) + (goto-char (+ body 1)) + (save-excursion + (insert diff))) (when (re-search-backward "\\*\\*\\* SUBJECT HERE \\*\\*\\*" nil t) (kill-line)))) |