summary refs log tree commit diff
diff options
context:
space:
mode:
authorArun Isaac2019-10-08 20:56:01 +0530
committerArun Isaac2019-10-08 20:56:01 +0530
commite0849c498564b4d23df503a34c22fb237551bbc8 (patch)
tree6acde2d0ee6dee92968027d6c8501edb9bf7c600
parent5058ce6ea76bc1104a5950a50d50b06969296215 (diff)
downloadguile-email-e0849c498564b4d23df503a34c22fb237551bbc8.tar.gz
guile-email-e0849c498564b4d23df503a34c22fb237551bbc8.tar.lz
guile-email-e0849c498564b4d23df503a34c22fb237551bbc8.zip
Reindent calls to call-with-port.
* email/email.scm (body->mime-entities, email->headers+body): Reindent
calls to call-with-port.
* email/quoted-printable.scm (quoted-printable-encode,
q-encoding-encode): Reindent calls to call-with-port.
* tests/utils.scm ("read-bytes-till returns eof-object on end of
file"): Reindent call to call-with-port.
-rw-r--r--email/email.scm12
-rw-r--r--email/quoted-printable.scm13
-rw-r--r--tests/utils.scm2
3 files changed, 12 insertions, 15 deletions
diff --git a/email/email.scm b/email/email.scm
index 7cef7e7..8cb9757 100644
--- a/email/email.scm
+++ b/email/email.scm
@@ -588,17 +588,15 @@ BOUNDARY (as explained in RFC2045), and return that list."
           (eof-object)
           (read-till-boundary port))))
 
-  (call-with-port
-   (open-bytevector-input-port body)
-   (lambda (port)
-     (read-till-boundary port)
-     (read-objects read-mime-entity port))))
+  (call-with-port (open-bytevector-input-port body)
+    (lambda (port)
+      (read-till-boundary port)
+      (read-objects read-mime-entity port))))
 
 (define (email->headers+body email)
   "Split EMAIL bytevector into headers and body. Return as multiple
 values. The returned headers is a string and body is a bytevector."
-  (call-with-port
-   (open-bytevector-input-port email)
+  (call-with-port (open-bytevector-input-port email)
     (lambda (port)
       ;; Email headers must strictly be ASCII characters. But for the
       ;; sake of supporting Emacs message mode parens style addresses
diff --git a/email/quoted-printable.scm b/email/quoted-printable.scm
index 84c52c1..e501af1 100644
--- a/email/quoted-printable.scm
+++ b/email/quoted-printable.scm
@@ -91,7 +91,7 @@
   (match-lambda*
     (((? bytevector? bv))
      (call-with-port (open-bytevector-input-port bv)
-                     quoted-printable-encode))
+       quoted-printable-encode))
     (((? port? in))
      (call-with-output-string
        (cut quoted-printable-encode in <>)))
@@ -110,9 +110,8 @@
   (string-map
    (lambda (c)
      (if (char=? c #\Space) #\_ c))
-   (call-with-port
-    (open-bytevector-input-port bv)
-    (lambda (in)
-      (call-with-output-string
-        (cut quoted-printable-style-encode in <>
-             %q-encoding-literal-char-set))))))
+   (call-with-port (open-bytevector-input-port bv)
+     (lambda (in)
+       (call-with-output-string
+         (cut quoted-printable-style-encode in <>
+              %q-encoding-literal-char-set))))))
diff --git a/tests/utils.scm b/tests/utils.scm
index b787d9f..7681c72 100644
--- a/tests/utils.scm
+++ b/tests/utils.scm
@@ -28,7 +28,7 @@
 (test-assert "read-bytes-till returns eof-object on end of file"
   (eof-object?
    (call-with-port (open-bytevector-input-port (make-bytevector 0))
-                   (cut read-bytes-till <> (make-bytevector 1)))))
+     (cut read-bytes-till <> (make-bytevector 1)))))
 
 (test-assert "read-while returns eof-object on end of file"
   (eof-object?