aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2008-02-02 10:46:08 +0000
committerMichael Albinus2008-02-02 10:46:08 +0000
commit8cee022b93b32afcd2511298db2af813d5f53db3 (patch)
tree537b6016384e6d1179cb382a5508d03a6191f216
parentde04a3caaf69e13a0a39ed9f0c0f4d5923f35b0e (diff)
downloademacs-8cee022b93b32afcd2511298db2af813d5f53db3.tar.gz
emacs-8cee022b93b32afcd2511298db2af813d5f53db3.zip
* net/tramp.el (tramp-handle-make-auto-save-file-name)
(tramp-completion-dissect-file-name, tramp-find-executable): Use `mapc' instead of `mapcar'. (tramp-open-connection-setup-interactive-shell): Send only single prompt setting commands, in order to avoid double-prompt.
-rw-r--r--lisp/net/tramp.el43
1 files changed, 26 insertions, 17 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 5a8068320ef..d6d6a524be9 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -3985,7 +3985,7 @@ Returns a file name in `tramp-auto-save-directory' for autosaving this file."
3985 ;; UNIQUIFY element of `auto-save-file-name-transforms'); but for 3985 ;; UNIQUIFY element of `auto-save-file-name-transforms'); but for
3986 ;; all other cases we must do it ourselves. 3986 ;; all other cases we must do it ourselves.
3987 (when (boundp 'auto-save-file-name-transforms) 3987 (when (boundp 'auto-save-file-name-transforms)
3988 (mapcar 3988 (mapc
3989 '(lambda (x) 3989 '(lambda (x)
3990 (when (and (string-match (car x) buffer-file-name) 3990 (when (and (string-match (car x) buffer-file-name)
3991 (not (car (cddr x)))) 3991 (not (car (cddr x))))
@@ -4768,18 +4768,18 @@ They are collected by `tramp-completion-dissect-file-name1'."
4768 "\\(" tramp-host-regexp x-nil "\\)$") 4768 "\\(" tramp-host-regexp x-nil "\\)$")
4769 1 2 3 nil))) 4769 1 2 3 nil)))
4770 4770
4771 (mapcar (lambda (regexp) 4771 (mapc
4772 (add-to-list 'result 4772 (lambda (regexp)
4773 (tramp-completion-dissect-file-name1 regexp name))) 4773 (add-to-list 'result (tramp-completion-dissect-file-name1 regexp name)))
4774 (list 4774 (list
4775 tramp-completion-file-name-structure1 4775 tramp-completion-file-name-structure1
4776 tramp-completion-file-name-structure2 4776 tramp-completion-file-name-structure2
4777 tramp-completion-file-name-structure3 4777 tramp-completion-file-name-structure3
4778 tramp-completion-file-name-structure4 4778 tramp-completion-file-name-structure4
4779 tramp-completion-file-name-structure5 4779 tramp-completion-file-name-structure5
4780 tramp-completion-file-name-structure6 4780 tramp-completion-file-name-structure6
4781 tramp-completion-file-name-structure7 4781 tramp-completion-file-name-structure7
4782 tramp-file-name-structure)) 4782 tramp-file-name-structure))
4783 4783
4784 (delq nil result))) 4784 (delq nil result)))
4785 4785
@@ -5264,9 +5264,9 @@ This function expects to be in the right *tramp* buffer."
5264 "then echo tramp_executable $d/%s; " 5264 "then echo tramp_executable $d/%s; "
5265 "break; fi; done <<'EOF'") 5265 "break; fi; done <<'EOF'")
5266 progname progname progname)) 5266 progname progname progname))
5267 (mapcar (lambda (d) 5267 (mapc (lambda (d)
5268 (tramp-send-command multi-method method user host d)) 5268 (tramp-send-command multi-method method user host d))
5269 dirlist) 5269 dirlist)
5270 (tramp-send-command multi-method method user host "EOF") 5270 (tramp-send-command multi-method method user host "EOF")
5271 (tramp-wait-for-output) 5271 (tramp-wait-for-output)
5272 (goto-char (point-max)) 5272 (goto-char (point-max))
@@ -6256,9 +6256,18 @@ to set up. METHOD, USER and HOST specify the connection."
6256 ;; the last time we sent a command, to avoid tramp-send-command to send 6256 ;; the last time we sent a command, to avoid tramp-send-command to send
6257 ;; "echo are you awake". 6257 ;; "echo are you awake".
6258 (setq tramp-last-cmd-time (current-time)) 6258 (setq tramp-last-cmd-time (current-time))
6259 (tramp-send-command-internal multi-method method user host
6260 "PROMPT_COMMAND=''")
6261 (erase-buffer)
6262 (tramp-send-command-internal multi-method method user host
6263 "PS2=''")
6264 (erase-buffer)
6265 (tramp-send-command-internal multi-method method user host
6266 "PS3=''")
6267 (erase-buffer)
6259 (tramp-send-command 6268 (tramp-send-command
6260 multi-method method user host 6269 multi-method method user host
6261 (format "PROMPT_COMMAND=''; PS1='%s%s%s'; PS2=''; PS3=''" 6270 (format "PS1='%s%s%s'"
6262 tramp-rsh-end-of-line 6271 tramp-rsh-end-of-line
6263 tramp-end-of-output 6272 tramp-end-of-output
6264 tramp-rsh-end-of-line)) 6273 tramp-rsh-end-of-line))