diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2007-04-07 04:33:00 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2007-04-07 04:33:00 +0000 |
commit | 0ad32c540fe16ceabf2b1deab140c59fcde2e92c (patch) | |
tree | 49bf41ac8a6ed1032d0a19346ca6dea33cc38c29 /lisp/net/tls.el | |
parent | 08b53f053738b723262aa120d272d0559cd7b1b8 (diff) | |
download | emacs-0ad32c540fe16ceabf2b1deab140c59fcde2e92c.tar.gz |
Fix last change.
Diffstat (limited to 'lisp/net/tls.el')
-rw-r--r-- | lisp/net/tls.el | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lisp/net/tls.el b/lisp/net/tls.el index ee093571dec..01a15139905 100644 --- a/lisp/net/tls.el +++ b/lisp/net/tls.el @@ -125,12 +125,17 @@ BUFFER is the buffer (or buffer-name) to associate with the process. with any buffer Third arg is name of the host to connect to, or its IP address. Fourth arg PORT is an integer specifying a port to connect to." - (let ((cmds tls-program) cmd done) + (let ((cmds tls-program) + (use-temp-buffer (null buffer)) + process cmd done) + (if use-temp-buffer + (setq buffer (generate-new-buffer " TLS"))) (message "Opening TLS connection to `%s'..." host) (while (and (not done) (setq cmd (pop cmds))) (message "Opening TLS connection with `%s'..." cmd) - (let* ((process-connection-type tls-process-connection-type) - (process (start-process + (let ((process-connection-type tls-process-connection-type) + response) + (setq process (start-process name buffer shell-file-name shell-command-switch (format-spec cmd @@ -139,10 +144,8 @@ Fourth arg PORT is an integer specifying a port to connect to." ?p (if (integerp port) (int-to-string port) port))))) - response) (while (and process (memq (process-status process) '(open run)) - buffer (save-excursion (set-buffer buffer) ;; XXX "blue moon" nntp.el bug (goto-char (point-min)) @@ -156,6 +159,9 @@ Fourth arg PORT is an integer specifying a port to connect to." (delete-process process)))) (message "Opening TLS connection to `%s'...%s" host (if done "done" "failed")) + (when use-temp-buffer + (or done (set-process-buffer process nil)) + (kill-buffer buffer)) done)) (provide 'tls) |