diff options
Diffstat (limited to 'lisp/net/tramp.el')
| -rw-r--r-- | lisp/net/tramp.el | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index afb7ab4312b..f13315bc662 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -460,6 +460,12 @@ usually suffice.") | |||
| 460 | "Regexp which matches `tramp-echo-mark' as it gets echoed by | 460 | "Regexp which matches `tramp-echo-mark' as it gets echoed by |
| 461 | the remote shell.") | 461 | the remote shell.") |
| 462 | 462 | ||
| 463 | (defcustom tramp-local-end-of-line | ||
| 464 | (if (memq system-type '(windows-nt)) "\r\n" "\n") | ||
| 465 | "*String used for end of line in local processes." | ||
| 466 | :group 'tramp | ||
| 467 | :type 'string) | ||
| 468 | |||
| 463 | (defcustom tramp-rsh-end-of-line "\n" | 469 | (defcustom tramp-rsh-end-of-line "\n" |
| 464 | "*String used for end of line in rsh connections. | 470 | "*String used for end of line in rsh connections. |
| 465 | I don't think this ever needs to be changed, so please tell me about it | 471 | I don't think this ever needs to be changed, so please tell me about it |
| @@ -1902,7 +1908,7 @@ Falls back to normal file name handler if no Tramp file name handler exists." | |||
| 1902 | ;; operations shall return at least a default value | 1908 | ;; operations shall return at least a default value |
| 1903 | ;; in order to give the user a chance to correct the | 1909 | ;; in order to give the user a chance to correct the |
| 1904 | ;; file name in the minibuffer. | 1910 | ;; file name in the minibuffer. |
| 1905 | ;; We cannot use 'debug as error handler. In order | 1911 | ;; We cannot use `debug' as error handler. In order |
| 1906 | ;; to get a full backtrace, one could apply | 1912 | ;; to get a full backtrace, one could apply |
| 1907 | ;; (setq debug-on-error t debug-on-signal t) | 1913 | ;; (setq debug-on-error t debug-on-signal t) |
| 1908 | (error | 1914 | (error |
| @@ -3109,14 +3115,16 @@ beginning of local filename are not substituted." | |||
| 3109 | (defun tramp-action-login (proc vec) | 3115 | (defun tramp-action-login (proc vec) |
| 3110 | "Send the login name." | 3116 | "Send the login name." |
| 3111 | (when (not (stringp tramp-current-user)) | 3117 | (when (not (stringp tramp-current-user)) |
| 3112 | (save-window-excursion | 3118 | (setq tramp-current-user |
| 3113 | (let ((enable-recursive-minibuffers t)) | 3119 | (with-connection-property vec "login-as" |
| 3114 | (pop-to-buffer (tramp-get-connection-buffer vec)) | 3120 | (save-window-excursion |
| 3115 | (setq tramp-current-user (read-string (match-string 0)))))) | 3121 | (let ((enable-recursive-minibuffers t)) |
| 3116 | (tramp-message vec 3 "Sending login name `%s'" tramp-current-user) | 3122 | (pop-to-buffer (tramp-get-connection-buffer vec)) |
| 3123 | (read-string (match-string 0))))))) | ||
| 3117 | (with-current-buffer (tramp-get-connection-buffer vec) | 3124 | (with-current-buffer (tramp-get-connection-buffer vec) |
| 3118 | (tramp-message vec 6 "\n%s" (buffer-string))) | 3125 | (tramp-message vec 6 "\n%s" (buffer-string))) |
| 3119 | (tramp-send-string vec tramp-current-user)) | 3126 | (tramp-message vec 3 "Sending login name `%s'" tramp-current-user) |
| 3127 | (tramp-send-string vec (concat tramp-current-user tramp-local-end-of-line))) | ||
| 3120 | 3128 | ||
| 3121 | (defun tramp-action-password (proc vec) | 3129 | (defun tramp-action-password (proc vec) |
| 3122 | "Query the user for a password." | 3130 | "Query the user for a password." |
| @@ -3148,7 +3156,7 @@ See also `tramp-action-yn'." | |||
| 3148 | (throw 'tramp-action 'permission-denied)) | 3156 | (throw 'tramp-action 'permission-denied)) |
| 3149 | (with-current-buffer (tramp-get-connection-buffer vec) | 3157 | (with-current-buffer (tramp-get-connection-buffer vec) |
| 3150 | (tramp-message vec 6 "\n%s" (buffer-string))) | 3158 | (tramp-message vec 6 "\n%s" (buffer-string))) |
| 3151 | (tramp-send-string vec "yes")))) | 3159 | (tramp-send-string vec (concat "yes" tramp-local-end-of-line))))) |
| 3152 | 3160 | ||
| 3153 | (defun tramp-action-yn (proc vec) | 3161 | (defun tramp-action-yn (proc vec) |
| 3154 | "Ask the user for confirmation using `y-or-n-p'. | 3162 | "Ask the user for confirmation using `y-or-n-p'. |
| @@ -3162,7 +3170,7 @@ See also `tramp-action-yesno'." | |||
| 3162 | (throw 'tramp-action 'permission-denied)) | 3170 | (throw 'tramp-action 'permission-denied)) |
| 3163 | (with-current-buffer (tramp-get-connection-buffer vec) | 3171 | (with-current-buffer (tramp-get-connection-buffer vec) |
| 3164 | (tramp-message vec 6 "\n%s" (buffer-string))) | 3172 | (tramp-message vec 6 "\n%s" (buffer-string))) |
| 3165 | (tramp-send-string vec "y")))) | 3173 | (tramp-send-string vec (concat "y" tramp-local-end-of-line))))) |
| 3166 | 3174 | ||
| 3167 | (defun tramp-action-terminal (proc vec) | 3175 | (defun tramp-action-terminal (proc vec) |
| 3168 | "Tell the remote host which terminal type to use. | 3176 | "Tell the remote host which terminal type to use. |
| @@ -3170,7 +3178,7 @@ The terminal type can be configured with `tramp-terminal-type'." | |||
| 3170 | (tramp-message vec 5 "Setting `%s' as terminal type." tramp-terminal-type) | 3178 | (tramp-message vec 5 "Setting `%s' as terminal type." tramp-terminal-type) |
| 3171 | (with-current-buffer (tramp-get-connection-buffer vec) | 3179 | (with-current-buffer (tramp-get-connection-buffer vec) |
| 3172 | (tramp-message vec 6 "\n%s" (buffer-string))) | 3180 | (tramp-message vec 6 "\n%s" (buffer-string))) |
| 3173 | (tramp-send-string vec tramp-terminal-type)) | 3181 | (tramp-send-string vec (concat tramp-terminal-type tramp-local-end-of-line))) |
| 3174 | 3182 | ||
| 3175 | (defun tramp-action-process-alive (proc vec) | 3183 | (defun tramp-action-process-alive (proc vec) |
| 3176 | "Check, whether a process has finished." | 3184 | "Check, whether a process has finished." |