From 72640c7b22f599369d799ce11d8bb55e10c78eeb Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 22 Nov 2020 15:46:07 -0500 Subject: gnus, notmuch: Share "attachment is patch?" logic This will gain another condition. Avoid repeating it across two spots. Message-Id: <20201122204609.12604-3-kyle@kyleam.com> --- piem-notmuch.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'piem-notmuch.el') diff --git a/piem-notmuch.el b/piem-notmuch.el index cd3153a..ccfae75 100644 --- a/piem-notmuch.el +++ b/piem-notmuch.el @@ -91,8 +91,8 @@ message itself if it looks like a patch." (let ((patches (delq nil (mapcar (lambda (part) - (and (member (plist-get part :content-type) - '("text/x-diff" "text/x-patch")) + (and (piem-am-patch-attachment-p + (plist-get part :content-type)) (plist-get part :content))) (plist-get body :content))))) (when patches -- cgit v1.2.3