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-gnus.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'piem-gnus.el') diff --git a/piem-gnus.el b/piem-gnus.el index 237eeb1..c1551ce 100644 --- a/piem-gnus.el +++ b/piem-gnus.el @@ -69,8 +69,8 @@ message itself if it looks like a patch." (delq nil (mapcar (lambda (handle) (and (listp handle) - (member (mm-handle-media-type handle) - '("text/x-diff" "text/x-patch")) + (piem-am-patch-attachment-p + (mm-handle-media-type handle)) (with-temp-buffer (mm-display-inline handle) (buffer-substring-no-properties -- cgit v1.2.3