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.el | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'piem.el') diff --git a/piem.el b/piem.el index 784d0b3..9cc6a88 100644 --- a/piem.el +++ b/piem.el @@ -561,6 +561,11 @@ This function depends on :url being configured for entries in ;;;; Patch handling +(defun piem-am-patch-attachment-p (type) + "Return non-nil if an attachment should be treated as a patch. +TYPE is a media type such as \"text/x-patch\"." + (member type '("text/x-diff" "text/x-patch"))) + (defun piem-extract-mbox-info (&optional buffer) "Collect information from message in BUFFER. If BUFFER is nil, the current buffer is used. Any message after -- cgit v1.2.3