+2011-03-29 Michael Welsh Duggan <md5i@md5i.com>
+
+ * nnimap.el (nnimap-open-connection-1): Is the login responds with a
+ new CAPABILITY, use it.
+
2011-03-29 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-agent.el (gnus-agent-fetch-headers): Don't message if we're not
(setq login-result
(nnimap-login (car credentials) (cadr credentials))))
(if (car login-result)
- ;; save the credentials if a save function exists
+ (progn
+ ;; Save the credentials if a save function exists
;; (such a function will only be passed if a new
- ;; token was created)
- (when (functionp (nth 2 credentials))
- (funcall (nth 2 credentials)))
+ ;; token was created).
+ (when (functionp (nth 2 credentials))
+ (funcall (nth 2 credentials)))
+ ;; See if CAPABILITY is set as part of login
+ ;; response.
+ (dolist (response (cddr login-result))
+ (when (string= "CAPABILITY" (upcase (car response)))
+ (setf (nnimap-capabilities nnimap-object)
+ (mapcar #'upcase (cdr response))))))
;; If the login failed, then forget the credentials
;; that are now possibly cached.
(dolist (host (list (nnoo-current-server 'nnimap)