* elmo-imap4.el (elmo-imap4-send-command): Use non-synchronizing
authoryoichi <yoichi>
Sat, 29 Apr 2006 15:00:04 +0000 (15:00 +0000)
committeryoichi <yoichi>
Sat, 29 Apr 2006 15:00:04 +0000 (15:00 +0000)
literals.

elmo/ChangeLog
elmo/elmo-imap4.el

index b2aa9fd..8464b2f 100644 (file)
@@ -1,3 +1,8 @@
+2006-04-29  Yoichi NAKAYAMA  <yoichi@geiin.org>
+
+       * elmo-imap4.el (elmo-imap4-send-command): Use non-synchronizing
+       literals.
+
 2006-04-21  Yoichi NAKAYAMA  <yoichi@geiin.org>
 
        * elmo-maildir.el (elmo-maildir-list-location): Reduce
index 6f87018..89ced71 100644 (file)
@@ -324,12 +324,22 @@ Returns a TAG string which is assigned to the COMMAND."
                                    cmdstr
                                    (elmo-imap4-format-quoted (nth 1 token)))))
                     ((eq kind 'literal)
-                     (setq cmdstr (concat cmdstr
-                                          (format "{%d}" (nth 2 token))))
-                     (process-send-string process cmdstr)
-                     (process-send-string process "\r\n")
-                     (setq cmdstr nil)
-                     (elmo-imap4-accept-continue-req session)
+                     (if (memq 'literal+
+                               (elmo-imap4-session-capability-internal
+                                session))
+                         ;; rfc2088
+                         (progn
+                           (setq cmdstr (concat cmdstr
+                                                (format "{%d+}" (nth 2 token))))
+                           (process-send-string process cmdstr)
+                           (process-send-string process "\r\n")
+                           (setq cmdstr nil))
+                       (setq cmdstr (concat cmdstr
+                                            (format "{%d}" (nth 2 token))))
+                       (process-send-string process cmdstr)
+                       (process-send-string process "\r\n")
+                       (setq cmdstr nil)
+                       (elmo-imap4-accept-continue-req session))
                      (cond ((stringp (nth 1 token))
                             (setq cmdstr (nth 1 token)))
                            ((bufferp (nth 1 token))