]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: Use `dolist' instead of `mapcar' for side-effects
authorJonas Bernoulli <jonas@bernoul.li>
Sat, 25 Apr 2020 20:18:09 +0000 (22:18 +0200)
committerDavid Bremner <david@tethera.net>
Tue, 26 May 2020 23:23:14 +0000 (20:23 -0300)
As recommended by the byte-compiler.

test/emacs-attachment-warnings.el

index a23692d722e51d15d7020df3610dbda169ad2fdb..8f4918ef60e114c3497f53709bbd85fed887a479 100644 (file)
@@ -67,16 +67,15 @@ Return `t' if the message would be sent, otherwise `nil'"
 
 (defun notmuch-test-attachment-warning-1 ()
   (let (output expected)
 
 (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)))
     (notmuch-test-expect-equal output expected)))