From: Jonas Bernoulli <jonas@bernoul.li>
To: notmuch@notmuchmail.org
Subject: [PATCH v3 3/3] emacs: Use `dolist' instead of `mapcar' for side-effects
Date: Sat, 25 Apr 2020 22:18:09 +0200 [thread overview]
Message-ID: <20200425201809.16503-3-jonas@bernoul.li> (raw)
In-Reply-To: <20200425201809.16503-1-jonas@bernoul.li>
As recommended by the byte-compiler.
---
test/emacs-attachment-warnings.el | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/test/emacs-attachment-warnings.el b/test/emacs-attachment-warnings.el
index a23692d7..8f4918ef 100644
--- a/test/emacs-attachment-warnings.el
+++ b/test/emacs-attachment-warnings.el
@@ -67,16 +67,15 @@ (defvar attachment-check-tests
(defun notmuch-test-attachment-warning-1 ()
(let (output expected)
- (mapcar (lambda (test)
- (let* ((expect (car test))
- (body (cdr test))
- (result (attachment-check-test body)))
- (push expect expected)
- (push (if (eq result expect)
- result
- ;; In the case of a failure, include the test
- ;; details to make it simpler to debug.
- (format "%S <-- %S" result body))
- output)))
- attachment-check-tests)
+ (dolist (test attachment-check-tests)
+ (let* ((expect (car test))
+ (body (cdr test))
+ (result (attachment-check-test body)))
+ (push expect expected)
+ (push (if (eq result expect)
+ result
+ ;; In the case of a failure, include the test
+ ;; details to make it simpler to debug.
+ (format "%S <-- %S" result body))
+ output)))
(notmuch-test-expect-equal output expected)))
--
2.26.0
next prev parent reply other threads:[~2020-04-25 20:18 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-15 18:28 [PATCH 0/4] Use cl-lib instead of deprecated cl Jonas Bernoulli
2020-04-15 18:28 ` [PATCH 1/4] gitignore: Ignore generated python-cffi files Jonas Bernoulli
2020-04-15 18:28 ` [PATCH 2/4] emacs: Declare function notmuch-show-get-message-id Jonas Bernoulli
2020-04-16 11:11 ` David Bremner
2020-04-15 18:28 ` [PATCH 3/4] emacs: Explicitly depend on Emacs 24 Jonas Bernoulli
2020-04-15 18:28 ` [PATCH 4/4] emacs: Use `cl-lib' instead of deprecated `cl' Jonas Bernoulli
2020-04-16 11:27 ` David Edmondson
2020-04-16 17:27 ` [PATCH] " William Casarin
2020-04-17 11:06 ` David Bremner
2020-04-17 15:05 ` Jonas Bernoulli
2020-04-21 14:22 ` David Bremner
2020-04-25 20:24 ` Jonas Bernoulli
2020-04-27 10:43 ` David Bremner
2020-04-17 15:00 ` [PATCH v2] " Jonas Bernoulli
2020-04-25 20:18 ` [PATCH v3 1/3] " Jonas Bernoulli
2020-04-25 20:18 ` [PATCH v3 2/3] emacs: Add simple make target to compile emacs lisp tests Jonas Bernoulli
2020-05-24 21:53 ` David Bremner
2020-05-26 19:49 ` Jonas Bernoulli
2020-04-25 20:18 ` Jonas Bernoulli [this message]
2020-05-24 19:27 ` [PATCH v3 3/3] emacs: Use `dolist' instead of `mapcar' for side-effects Tomi Ollila
2020-05-26 23:40 ` David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200425201809.16503-3-jonas@bernoul.li \
--to=jonas@bernoul.li \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).