tls.el (open-tls-stream): Remove unneeded buffer contents when opening the connection
authorTed Zlatanov <tzz@lifelogs.com>
Wed, 5 Jun 2013 22:19:15 +0000 (22:19 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Wed, 5 Jun 2013 22:19:15 +0000 (22:19 +0000)
lisp/ChangeLog
lisp/tls.el

index f53f608..7a43360 100644 (file)
@@ -4,6 +4,13 @@
        ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag
        to see whether the group was synced before.
 
+2013-06-05  Teodor Zlatanov  <tzz@lifelogs.com>
+
+       * net/tls.el (open-tls-stream): Remove unneeded buffer contents up
+       to point when opening the connection.
+       Suggested by João Távora <joaotavora@gmail.com> in
+       <http://lists.gnu.org/archive/html/emacs-devel/2013-05/msg00464.html>.
+
 2013-06-04  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * gnus-art.el (article-date-ut, article-update-date-lapsed): Don't
index 7fc314e..3d8d8de 100644 (file)
@@ -286,7 +286,10 @@ NOT trusted. Accept anyway? " host)))))
                             (format "Host name in certificate doesn't \
 match `%s'. Connect anyway? " host))))))
        (setq done nil)
-       (delete-process process)))
+       (delete-process process))
+      ;; Delete all the informational messages that could confuse
+      ;; future uses of `buffer'.
+      (delete-region (point-min) (point)))
     (message "Opening TLS connection to `%s'...%s"
             host (if done "done" "failed"))
     (when use-temp-buffer