diff options
| author | Richard M. Stallman | 1997-09-08 10:27:58 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-09-08 10:27:58 +0000 |
| commit | e35832ba251539c7bb883eee137097f0b27758b8 (patch) | |
| tree | cca5c19c504781f752300bd218fc8cdd523ae4c2 | |
| parent | 24c2a54f4ca12a428d0402ab76f926bfb1723261 (diff) | |
| download | emacs-e35832ba251539c7bb883eee137097f0b27758b8.tar.gz emacs-e35832ba251539c7bb883eee137097f0b27758b8.zip | |
(telnet-initial-filter): Temporarily go to proper buffer.
| -rw-r--r-- | lisp/telnet.el | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/lisp/telnet.el b/lisp/telnet.el index 034c0341a6f..caecf8e368d 100644 --- a/lisp/telnet.el +++ b/lisp/telnet.el | |||
| @@ -131,20 +131,22 @@ rejecting one login and prompting again for a username and password.") | |||
| 131 | 131 | ||
| 132 | (defun telnet-initial-filter (proc string) | 132 | (defun telnet-initial-filter (proc string) |
| 133 | ;For reading up to and including password; also will get machine type. | 133 | ;For reading up to and including password; also will get machine type. |
| 134 | (let ((case-fold-search t)) | 134 | (save-current-buffer |
| 135 | (cond ((string-match "No such host" string) | 135 | (set-buffer (process-buffer proc)) |
| 136 | (kill-buffer (process-buffer proc)) | 136 | (let ((case-fold-search t)) |
| 137 | (error "No such host")) | 137 | (cond ((string-match "No such host" string) |
| 138 | ((string-match "passw" string) | 138 | (kill-buffer (process-buffer proc)) |
| 139 | (telnet-filter proc string) | 139 | (error "No such host")) |
| 140 | (setq telnet-count 0) | 140 | ((string-match "passw" string) |
| 141 | (send-string proc (concat (comint-read-noecho "Password: " t) | ||
| 142 | telnet-new-line))) | ||
| 143 | (t (telnet-check-software-type-initialize string) | ||
| 144 | (telnet-filter proc string) | 141 | (telnet-filter proc string) |
| 145 | (cond ((> telnet-count telnet-maximum-count) | 142 | (setq telnet-count 0) |
| 146 | (set-process-filter proc 'telnet-filter)) | 143 | (send-string proc (concat (comint-read-noecho "Password: " t) |
| 147 | (t (setq telnet-count (1+ telnet-count)))))))) | 144 | telnet-new-line))) |
| 145 | (t (telnet-check-software-type-initialize string) | ||
| 146 | (telnet-filter proc string) | ||
| 147 | (cond ((> telnet-count telnet-maximum-count) | ||
| 148 | (set-process-filter proc 'telnet-filter)) | ||
| 149 | (t (setq telnet-count (1+ telnet-count))))))))) | ||
| 148 | 150 | ||
| 149 | ;; Identical to comint-simple-send, except that it sends telnet-new-line | 151 | ;; Identical to comint-simple-send, except that it sends telnet-new-line |
| 150 | ;; instead of "\n". | 152 | ;; instead of "\n". |