diff options
| author | Michael Albinus | 2010-12-10 05:14:57 +0100 |
|---|---|---|
| committer | Michael Albinus | 2010-12-10 05:14:57 +0100 |
| commit | 158d59456887041e74cf0d8e0fa19bc65e6e4b1f (patch) | |
| tree | 30244e646d4f3706cf53bf02192ee9443f69875a /lisp | |
| parent | ffda048bfbfd66b55001574703be3aa31231b808 (diff) | |
| download | emacs-158d59456887041e74cf0d8e0fa19bc65e6e4b1f.tar.gz emacs-158d59456887041e74cf0d8e0fa19bc65e6e4b1f.zip | |
* net/tramp.el (tramp-action-password, tramp-process-actions):
Revert patch from 2010-12-08. Use `save-restriction'.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 45 |
2 files changed, 28 insertions, 22 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8184473d035..55206c2c8ba 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-12-10 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * net/tramp.el (tramp-action-password, tramp-process-actions): | ||
| 4 | Revert patch from 2010-12-08. Use `save-restriction'. | ||
| 5 | |||
| 1 | 2010-12-09 Eli Zaretskii <eliz@gnu.org> | 6 | 2010-12-09 Eli Zaretskii <eliz@gnu.org> |
| 2 | 7 | ||
| 3 | * menu-bar.el (menu-bar-frame-for-menubar, menu-bar-positive-p): | 8 | * menu-bar.el (menu-bar-frame-for-menubar, menu-bar-positive-p): |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 0b7bae67082..babcc2ca250 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -6712,10 +6712,9 @@ file exists and nonzero exit status otherwise." | |||
| 6712 | (with-current-buffer (process-buffer proc) | 6712 | (with-current-buffer (process-buffer proc) |
| 6713 | (tramp-check-for-regexp proc tramp-password-prompt-regexp) | 6713 | (tramp-check-for-regexp proc tramp-password-prompt-regexp) |
| 6714 | (tramp-message vec 3 "Sending %s" (match-string 1)) | 6714 | (tramp-message vec 3 "Sending %s" (match-string 1)) |
| 6715 | (tramp-message vec 6 "\n%s" (buffer-string))) | ||
| 6716 | (tramp-enter-password proc) | 6715 | (tramp-enter-password proc) |
| 6717 | ;; Remove password prompt, in order not to find it next iteration. | 6716 | ;; Hide password prompt. |
| 6718 | (delete-region (point-min) (point-max))) | 6717 | (narrow-to-region (point-max) (point-max)))) |
| 6719 | 6718 | ||
| 6720 | (defun tramp-action-succeed (proc vec) | 6719 | (defun tramp-action-succeed (proc vec) |
| 6721 | "Signal success in finding shell prompt." | 6720 | "Signal success in finding shell prompt." |
| @@ -6816,25 +6815,27 @@ The terminal type can be configured with `tramp-terminal-type'." | |||
| 6816 | (with-temp-message "" | 6815 | (with-temp-message "" |
| 6817 | ;; Enable auth-source and password-cache. | 6816 | ;; Enable auth-source and password-cache. |
| 6818 | (tramp-set-connection-property vec "first-password-request" t) | 6817 | (tramp-set-connection-property vec "first-password-request" t) |
| 6819 | (let (exit) | 6818 | (save-restriction |
| 6820 | (while (not exit) | 6819 | (let (exit) |
| 6821 | (tramp-message proc 3 "Waiting for prompts from remote shell") | 6820 | (while (not exit) |
| 6822 | (setq exit | 6821 | (tramp-message proc 3 "Waiting for prompts from remote shell") |
| 6823 | (catch 'tramp-action | 6822 | (setq exit |
| 6824 | (if timeout | 6823 | (catch 'tramp-action |
| 6825 | (with-timeout (timeout) | 6824 | (if timeout |
| 6826 | (tramp-process-one-action proc vec actions)) | 6825 | (with-timeout (timeout) |
| 6827 | (tramp-process-one-action proc vec actions))))) | 6826 | (tramp-process-one-action proc vec actions)) |
| 6828 | (with-current-buffer (tramp-get-connection-buffer vec) | 6827 | (tramp-process-one-action proc vec actions))))) |
| 6829 | (tramp-message vec 6 "\n%s" (buffer-string))) | 6828 | (with-current-buffer (tramp-get-connection-buffer vec) |
| 6830 | (unless (eq exit 'ok) | 6829 | (widen) |
| 6831 | (tramp-clear-passwd vec) | 6830 | (tramp-message vec 6 "\n%s" (buffer-string))) |
| 6832 | (tramp-error-with-buffer | 6831 | (unless (eq exit 'ok) |
| 6833 | nil vec 'file-error | 6832 | (tramp-clear-passwd vec) |
| 6834 | (cond | 6833 | (tramp-error-with-buffer |
| 6835 | ((eq exit 'permission-denied) "Permission denied") | 6834 | nil vec 'file-error |
| 6836 | ((eq exit 'process-died) "Process died") | 6835 | (cond |
| 6837 | (t "Login failed"))))))) | 6836 | ((eq exit 'permission-denied) "Permission denied") |
| 6837 | ((eq exit 'process-died) "Process died") | ||
| 6838 | (t "Login failed")))))))) | ||
| 6838 | 6839 | ||
| 6839 | ;; Utility functions. | 6840 | ;; Utility functions. |
| 6840 | 6841 | ||