From: Ted Zlatanov Date: Wed, 5 Jun 2013 15:03:37 +0000 (-0400) Subject: (open-tls-stream): Remove unneeded buffer contents when opening the connection. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2026^2~70 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=28f5da6df34eb64677e25afd001c1f48b012aec7;p=emacs.git (open-tls-stream): Remove unneeded buffer contents when opening the connection. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 106d73ec206..006bb9d9fe6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2013-06-05 Teodor Zlatanov + + * net/tls.el (open-tls-stream): Remove unneeded buffer contents up + to point when opening the connection. + Suggested by João Távora in + . + 2013-06-05 Stefan Monnier * subr.el (load-history-regexp, load-history-filename-element) diff --git a/lisp/net/tls.el b/lisp/net/tls.el index 7fc314ef088..3d8d8decf47 100644 --- a/lisp/net/tls.el +++ b/lisp/net/tls.el @@ -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