aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinglu Chen <public@yoctocell.xyz>2021-02-16 12:23:17 +0100
committerXinglu Chen <public@yoctocell.xyz>2021-02-16 12:24:04 +0100
commit8c3b13e52d8446d1d6cecfc6974a057d93161a77 (patch)
tree28f8b3506e47cf62195d0c345309c54b18a5afab
parent9631303159b2520bc36edaf64241af02f9a26715 (diff)
Make regexp stricter for matching signed messages
This should fix the problem seen in <87sg5wxo0q.fsf@protesilaos.com> * git-email.el (git-email--compose-email): Match the beginning and end of line. Reported-by: Protesilaos Stavrou <info@protesilaos.com> Signed-off-by: Xinglu Chen <public@yoctocell.xyz>
-rw-r--r--git-email.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-email.el b/git-email.el
index 6276181..3db1ca3 100644
--- a/git-email.el
+++ b/git-email.el
@@ -320,7 +320,7 @@ them into the message buffer."
;; Insert diff at the beginning of the body
(goto-char (point-min))
(let ((body (or (re-search-forward
- "<#part \\(encrypt\\|sign\\)=.*mime>"
+ "^<#part \\(encrypt\\|sign\\)=.*mime>$"
nil t)
(re-search-forward (regexp-quote mail-header-separator) nil t))))
(save-excursion