# HG changeset patch # User Katsumi Yamaoka # Date 1216342750 0 # Node ID 2a63efc828804d770f5e626e6c62c9845ac1c375 # Parent 5dafdebb219de14901a9cb0b0e6ebc2b88f69bc6 (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 -r 5dafdebb219d -r 2a63efc82880 lisp/ChangeLog --- a/lisp/ChangeLog Thu Jul 17 23:41:29 2008 +0000 +++ b/lisp/ChangeLog Fri Jul 18 00:59:10 2008 +0000 @@ -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 -r 5dafdebb219d -r 2a63efc82880 lisp/net/tls.el --- a/lisp/net/tls.el Thu Jul 17 23:41:29 2008 +0000 +++ b/lisp/net/tls.el Fri Jul 18 00:59:10 2008 +0000 @@ -216,7 +216,11 @@ (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)))