Tweak response representation slightly to clean it up.
authorChris Hanson <org/chris-hanson/cph>
Sun, 23 Apr 2000 04:13:53 +0000 (04:13 +0000)
committerChris Hanson <org/chris-hanson/cph>
Sun, 23 Apr 2000 04:13:53 +0000 (04:13 +0000)
v7/src/imail/imap-response.scm

index 58cb7506646680f2b515ce613dca6e0d1587adcf..670d4ad802de4870d898451d0676bd7a282b0562 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;; $Id: imap-response.scm,v 1.3 2000/04/23 03:04:55 cph Exp $
+;;; $Id: imap-response.scm,v 1.4 2000/04/23 04:13:53 cph Exp $
 ;;;
 ;;; Copyright (c) 2000 Massachusetts Institute of Technology
 ;;;
   (discard-known-char #\[ port)
   (let ((code
         (let ((x (intern (read-resp-text-atom port))))
-          (case x
-            ((ALERT PARSE READ-ONLY READ-WRITE TRYCREATE)
-             x)
-            ((NEWNAME)
-             (discard-known-char #\space port)
-             (let ((old (read-xstring port)))
-               (discard-known-char #\space port)
-               (list x old (read-xstring port))))
-            ((UIDVALIDITY UNSEEN)
-             (discard-known-char #\space port)
-             (list x (read-nz-number port)))
-            ((PERMANENTFLAGS)
-             (discard-known-char #\space port)
-             (cons x (read-list port read-pflag)))
-            (else
-             (if (char=? #\space (peek-char-no-eof port))
-                 (begin
-                   (read-char port)
-                   (list x (read-resp-text-tail port)))
-                 x))))))
+          (cons x
+                (case x
+                  ((ALERT PARSE READ-ONLY READ-WRITE TRYCREATE)
+                   '())
+                  ((NEWNAME)
+                   (discard-known-char #\space port)
+                   (let ((old (read-xstring port)))
+                     (discard-known-char #\space port)
+                     (list old (read-xstring port))))
+                  ((UIDVALIDITY UNSEEN)
+                   (discard-known-char #\space port)
+                   (list (read-nz-number port)))
+                  ((PERMANENTFLAGS)
+                   (discard-known-char #\space port)
+                   (read-list port read-pflag))
+                  (else
+                   (if (char=? #\space (peek-char-no-eof port))
+                       (begin
+                         (read-char port)
+                         (read-resp-text-tail port))
+                       '())))))))
     (discard-known-char #\] port)
     (discard-known-char #\space port)
     code))