* net/rcirc.el (rcirc): Use the user's stored encryption method by default.
authorDeniz Dogan <deniz@dogan.se>
Sun, 29 May 2011 05:42:00 +0000 (07:42 +0200)
committerDeniz Dogan <deniz@dogan.se>
Sun, 29 May 2011 05:42:00 +0000 (07:42 +0200)
lisp/ChangeLog
lisp/net/rcirc.el

index a236441..b82b56d 100644 (file)
@@ -1,3 +1,8 @@
+2011-05-29  Deniz Dogan  <deniz@dogan.se>
+
+       * net/rcirc.el (rcirc): Use the user's stored encryption method by
+       default.
+
 2011-05-29  Chong Yidong  <cyd@stupidchicken.com>
 
        * select.el: Don't perform clipboard-manager saving in hooks;
index 0d02688..47085af 100644 (file)
@@ -456,7 +456,12 @@ If ARG is non-nil, instead prompt for connection parameters."
              (encryption
               (intern (completing-read "Encryption (default plain): "
                                        '("plain" "tls")
-                                       nil t nil nil "plain"))))
+                                       nil t
+                                       (let ((choice (plist-get server-plist
+                                                                :encryption)))
+                                         (when choice
+                                           (symbol-name choice)))
+                                       nil "plain"))))
        (rcirc-connect server port nick user-name
                       rcirc-default-full-name
                       channels password encryption))