From 28f5da6df34eb64677e25afd001c1f48b012aec7 Mon Sep 17 00:00:00 2001 From: Ted Zlatanov Date: Wed, 5 Jun 2013 11:03:37 -0400 Subject: [PATCH] (open-tls-stream): Remove unneeded buffer contents when opening the connection. --- lisp/ChangeLog | 7 +++++++ lisp/net/tls.el | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) 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 -- 2.39.2