(nnimap-open-connection): Prepare to support open-gnutls-stream.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Wed, 6 Oct 2010 11:47:03 +0000 (13:47 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Wed, 6 Oct 2010 11:47:03 +0000 (13:47 +0200)
lisp/ChangeLog
lisp/nnimap.el

index b283e39..ba4f460 100644 (file)
@@ -1,5 +1,8 @@
 2010-10-06  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * nnimap.el (nnimap-open-connection): Prepare to support
+       open-gnutls-stream.
+
        * shr.el: Rearrange function order to be more logical.
 
 2010-10-06  Julien Danjou  <julien@danjou.info>
index d56e2f4..7d935e4 100644 (file)
@@ -317,13 +317,16 @@ textual parts.")
                   'starttls))
                '("imap"))
               ((memq nnimap-stream '(ssl tls))
-               (open-tls-stream
-                "*nnimap*" (current-buffer) nnimap-address
-                (setq port
-                      (or nnimap-server-port
-                          (if (netrc-find-service-number "imaps")
-                              "imaps"
-                            "993"))))
+               (funcall (if (and nil
+                                 (fboundp 'open-gnutls-stream))
+                            'open-gnutls-stream
+                          'open-tls-stream)
+                        "*nnimap*" (current-buffer) nnimap-address
+                        (setq port
+                              (or nnimap-server-port
+                                  (if (netrc-find-service-number "imaps")
+                                      "imaps"
+                                    "993"))))
                '("143" "993" "imap" "imaps"))
               (t
                (error "Unknown stream type: %s" nnimap-stream))))