summaryrefslogtreecommitdiff
path: root/lisp/net/tls.el
diff options
context:
space:
mode:
authorKatsumi Yamaoka <yamaoka@jpl.org>2008-07-18 00:59:10 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2008-07-18 00:59:10 +0000
commit3c2dbd941620405691c0840aaa915c38ecc72249 (patch)
tree25685ebc1b4e0df87ff34d9081e76ca6a715ba65 /lisp/net/tls.el
parent12f165e92bb57ede754328d3c930946455e6d12b (diff)
downloademacs-3c2dbd941620405691c0840aaa915c38ecc72249.tar.gz
(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.
Diffstat (limited to 'lisp/net/tls.el')
-rw-r--r--lisp/net/tls.el6
1 files changed, 5 insertions, 1 deletions
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)))