From: Katsumi Yamaoka Date: Fri, 18 Jul 2008 00:59:10 +0000 (+0000) Subject: (open-tls-stream): Make it work with the 2nd argument BUFFER that is a string X-Git-Tag: emacs-pretest-23.0.90~4097 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3c2dbd941620405691c0840aaa915c38ecc72249;p=emacs.git (open-tls-stream): Make it work with the 2nd argument BUFFER that is a string but does not exist as a buffer object, as mentioned in the doc-string. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 64c6a97d942..7782a13b41c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2008-07-18 Katsumi Yamaoka + + * net/tls.el (open-tls-stream): Make it work with the 2nd argument + BUFFER that is a string but does not exist as a buffer object, as + mentioned in the doc-string. + 2008-07-17 Chong Yidong * simple.el (line-move-visual): Make it a defcustom. diff --git a/lisp/net/tls.el b/lisp/net/tls.el index 3044cb4ab71..64d113ae28e 100644 --- a/lisp/net/tls.el +++ b/lisp/net/tls.el @@ -216,7 +216,11 @@ Fourth arg PORT is an integer specifying a port to connect to." (use-temp-buffer (null buffer)) process cmd done) (if use-temp-buffer - (setq buffer (generate-new-buffer " TLS"))) + (setq buffer (generate-new-buffer " TLS")) + ;; BUFFER is a string but does not exist as a buffer object. + (unless (and (get-buffer buffer) + (buffer-name (get-buffer buffer))) + (generate-new-buffer buffer))) (with-current-buffer buffer (message "Opening TLS connection to `%s'..." host) (while (and (not done) (setq cmd (pop cmds)))