Mercurial > emacs
diff lisp/net/tramp.el @ 80000:24a171b96a66
* 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.
author | Michael Albinus <michael.albinus@gmx.de> |
---|---|
date | Sat, 02 Feb 2008 10:46:08 +0000 |
parents | 6888fd3398e8 |
children | 1b9faa405c59 |
line wrap: on
line diff
--- a/lisp/net/tramp.el Sat Feb 02 10:00:12 2008 +0000 +++ b/lisp/net/tramp.el Sat Feb 02 10:46:08 2008 +0000 @@ -3985,7 +3985,7 @@ ;; UNIQUIFY element of `auto-save-file-name-transforms'); but for ;; all other cases we must do it ourselves. (when (boundp 'auto-save-file-name-transforms) - (mapcar + (mapc '(lambda (x) (when (and (string-match (car x) buffer-file-name) (not (car (cddr x)))) @@ -4768,18 +4768,18 @@ "\\(" tramp-host-regexp x-nil "\\)$") 1 2 3 nil))) - (mapcar (lambda (regexp) - (add-to-list 'result - (tramp-completion-dissect-file-name1 regexp name))) - (list - tramp-completion-file-name-structure1 - tramp-completion-file-name-structure2 - tramp-completion-file-name-structure3 - tramp-completion-file-name-structure4 - tramp-completion-file-name-structure5 - tramp-completion-file-name-structure6 - tramp-completion-file-name-structure7 - tramp-file-name-structure)) + (mapc + (lambda (regexp) + (add-to-list 'result (tramp-completion-dissect-file-name1 regexp name))) + (list + tramp-completion-file-name-structure1 + tramp-completion-file-name-structure2 + tramp-completion-file-name-structure3 + tramp-completion-file-name-structure4 + tramp-completion-file-name-structure5 + tramp-completion-file-name-structure6 + tramp-completion-file-name-structure7 + tramp-file-name-structure)) (delq nil result))) @@ -5264,9 +5264,9 @@ "then echo tramp_executable $d/%s; " "break; fi; done <<'EOF'") progname progname progname)) - (mapcar (lambda (d) - (tramp-send-command multi-method method user host d)) - dirlist) + (mapc (lambda (d) + (tramp-send-command multi-method method user host d)) + dirlist) (tramp-send-command multi-method method user host "EOF") (tramp-wait-for-output) (goto-char (point-max)) @@ -6256,9 +6256,18 @@ ;; the last time we sent a command, to avoid tramp-send-command to send ;; "echo are you awake". (setq tramp-last-cmd-time (current-time)) + (tramp-send-command-internal multi-method method user host + "PROMPT_COMMAND=''") + (erase-buffer) + (tramp-send-command-internal multi-method method user host + "PS2=''") + (erase-buffer) + (tramp-send-command-internal multi-method method user host + "PS3=''") + (erase-buffer) (tramp-send-command multi-method method user host - (format "PROMPT_COMMAND=''; PS1='%s%s%s'; PS2=''; PS3=''" + (format "PS1='%s%s%s'" tramp-rsh-end-of-line tramp-end-of-output tramp-rsh-end-of-line))