diff options
| author | Michael Albinus | 2012-01-17 11:29:52 +0100 |
|---|---|---|
| committer | Michael Albinus | 2012-01-17 11:29:52 +0100 |
| commit | 4cb0aa7579893362daebd1c203248f8bcc231f0b (patch) | |
| tree | a234dbe364108e7d60560a422084ebba2ca48d24 | |
| parent | 1b0880d5f1b478fe097aef8b702a5c7c70bd9f18 (diff) | |
| download | emacs-4cb0aa7579893362daebd1c203248f8bcc231f0b.tar.gz emacs-4cb0aa7579893362daebd1c203248f8bcc231f0b.zip | |
* net/tramp.el (tramp-local-end-of-line): New defcustom.
(tramp-action-login, tramp-action-yesno, tramp-action-yn)
(tramp-action-terminal): Use it. (Bug#10530)
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 16 |
2 files changed, 17 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2813d80d9ff..fa51e7eb28f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-01-17 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * net/tramp.el (tramp-local-end-of-line): New defcustom. | ||
| 4 | (tramp-action-login, tramp-action-yesno, tramp-action-yn) | ||
| 5 | (tramp-action-terminal): Use it. (Bug#10530) | ||
| 6 | |||
| 1 | 2012-01-16 Stefan Monnier <monnier@iro.umontreal.ca> | 7 | 2012-01-16 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 8 | ||
| 3 | * minibuffer.el (completion--replace): Strip properties (bug#10062). | 9 | * minibuffer.el (completion--replace): Strip properties (bug#10062). |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index afb7ab4312b..98295c6617a 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 |
| @@ -3116,7 +3122,7 @@ beginning of local filename are not substituted." | |||
| 3116 | (tramp-message vec 3 "Sending login name `%s'" tramp-current-user) | 3122 | (tramp-message vec 3 "Sending login name `%s'" tramp-current-user) |
| 3117 | (with-current-buffer (tramp-get-connection-buffer vec) | 3123 | (with-current-buffer (tramp-get-connection-buffer vec) |
| 3118 | (tramp-message vec 6 "\n%s" (buffer-string))) | 3124 | (tramp-message vec 6 "\n%s" (buffer-string))) |
| 3119 | (tramp-send-string vec tramp-current-user)) | 3125 | (tramp-send-string vec (concat tramp-current-user tramp-local-end-of-line))) |
| 3120 | 3126 | ||
| 3121 | (defun tramp-action-password (proc vec) | 3127 | (defun tramp-action-password (proc vec) |
| 3122 | "Query the user for a password." | 3128 | "Query the user for a password." |
| @@ -3148,7 +3154,7 @@ See also `tramp-action-yn'." | |||
| 3148 | (throw 'tramp-action 'permission-denied)) | 3154 | (throw 'tramp-action 'permission-denied)) |
| 3149 | (with-current-buffer (tramp-get-connection-buffer vec) | 3155 | (with-current-buffer (tramp-get-connection-buffer vec) |
| 3150 | (tramp-message vec 6 "\n%s" (buffer-string))) | 3156 | (tramp-message vec 6 "\n%s" (buffer-string))) |
| 3151 | (tramp-send-string vec "yes")))) | 3157 | (tramp-send-string vec (concat "yes" tramp-local-end-of-line))))) |
| 3152 | 3158 | ||
| 3153 | (defun tramp-action-yn (proc vec) | 3159 | (defun tramp-action-yn (proc vec) |
| 3154 | "Ask the user for confirmation using `y-or-n-p'. | 3160 | "Ask the user for confirmation using `y-or-n-p'. |
| @@ -3162,7 +3168,7 @@ See also `tramp-action-yesno'." | |||
| 3162 | (throw 'tramp-action 'permission-denied)) | 3168 | (throw 'tramp-action 'permission-denied)) |
| 3163 | (with-current-buffer (tramp-get-connection-buffer vec) | 3169 | (with-current-buffer (tramp-get-connection-buffer vec) |
| 3164 | (tramp-message vec 6 "\n%s" (buffer-string))) | 3170 | (tramp-message vec 6 "\n%s" (buffer-string))) |
| 3165 | (tramp-send-string vec "y")))) | 3171 | (tramp-send-string vec (concat "y" tramp-local-end-of-line))))) |
| 3166 | 3172 | ||
| 3167 | (defun tramp-action-terminal (proc vec) | 3173 | (defun tramp-action-terminal (proc vec) |
| 3168 | "Tell the remote host which terminal type to use. | 3174 | "Tell the remote host which terminal type to use. |
| @@ -3170,7 +3176,7 @@ The terminal type can be configured with `tramp-terminal-type'." | |||
| 3170 | (tramp-message vec 5 "Setting `%s' as terminal type." tramp-terminal-type) | 3176 | (tramp-message vec 5 "Setting `%s' as terminal type." tramp-terminal-type) |
| 3171 | (with-current-buffer (tramp-get-connection-buffer vec) | 3177 | (with-current-buffer (tramp-get-connection-buffer vec) |
| 3172 | (tramp-message vec 6 "\n%s" (buffer-string))) | 3178 | (tramp-message vec 6 "\n%s" (buffer-string))) |
| 3173 | (tramp-send-string vec tramp-terminal-type)) | 3179 | (tramp-send-string vec (concat tramp-terminal-type tramp-local-end-of-line))) |
| 3174 | 3180 | ||
| 3175 | (defun tramp-action-process-alive (proc vec) | 3181 | (defun tramp-action-process-alive (proc vec) |
| 3176 | "Check, whether a process has finished." | 3182 | "Check, whether a process has finished." |