From 2341b3403e607a1efd8cd47093cd7200bc63e521 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Mon, 10 Aug 2020 23:16:32 -0400 Subject: Fix handling of -am-ready-mbox values 0ee97e9 (Explicitly specify --patch-format in git-am calls, 2020-08-09) made it possible for a piem-am-ready-mbox-functions member to specify the format of the mbox by returning (FUNCTION FORMAT). If FUNCTION is returned, then mboxrd is supposed to be taken as the default format. The handling is broken, though, because piem-am-ready-mbox tries to detect the (FUNCTION FORMAT) form with listp, but that of course also returns true when the return value is simply a function. Instead, check to see whether the element matches a valid format value. Switch from (FUNCTION FORMAT) to (FUNCTION . FORMAT) to make it more convenient to pull out FORMAT with cdr-safe. Message-Id: <877du5c1nz.fsf@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 9e42185..244c389 100644 --- a/piem-gnus.el +++ b/piem-gnus.el @@ -77,7 +77,7 @@ message itself if it looks like a patch." (point-min) (point-max))))) gnus-article-mime-handles)))) (when patches - (list (lambda () + (cons (lambda () (dolist (patch patches) (insert patch))) "mbox")))) @@ -90,7 +90,7 @@ message itself if it looks like a patch." (buffer-substring-no-properties (point-min) (point-max))))))) (when patch - (list (lambda () (insert patch)) + (cons (lambda () (insert patch)) "mbox"))))))) ;;;###autoload -- cgit v1.2.3