aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2007-10-08 20:07:16 +0000
committerMichael Albinus2007-10-08 20:07:16 +0000
commit1834b39f166d6f16e7c0a9f79101d77a7a19c47c (patch)
treedaa4d29a9d169f4509a2635e6cc48f5a1f39e0e2
parent8ea4c22f849830c44cb9ecdc47995699892fdb13 (diff)
downloademacs-1834b39f166d6f16e7c0a9f79101d77a7a19c47c.tar.gz
emacs-1834b39f166d6f16e7c0a9f79101d77a7a19c47c.zip
* net/tramp.el (tramp-find-foreign-file-name-handler): Check also
host. (tramp-maybe-send-script): Apply `member' but `memq'. (tramp-advice-file-expand-wildcards): Simplify implementation.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/net/tramp.el27
2 files changed, 22 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d83960b9437..d4064ddfda0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12007-10-08 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp.el (tramp-find-foreign-file-name-handler): Check also
4 host.
5 (tramp-maybe-send-script): Apply `member' but `memq'.
6 (tramp-advice-file-expand-wildcards): Simplify implementation.
7
12007-10-08 Juanma Barranquero <lekktu@gmail.com> 82007-10-08 Juanma Barranquero <lekktu@gmail.com>
2 9
3 * follow.el (follow-mode): Don't run hooks twice. Use `when'. 10 * follow.el (follow-mode): Don't run hooks twice. Use `when'.
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 9a20e9a81c6..26846f562f5 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -2140,9 +2140,9 @@ target of the symlink differ."
2140 2140
2141 ;; If FILENAME is a Tramp name, use just the localname component. 2141 ;; If FILENAME is a Tramp name, use just the localname component.
2142 (when (tramp-tramp-file-p filename) 2142 (when (tramp-tramp-file-p filename)
2143 (setq filename (tramp-file-name-localname 2143 (setq filename
2144 (tramp-dissect-file-name 2144 (tramp-file-name-localname
2145 (expand-file-name filename))))) 2145 (tramp-dissect-file-name (expand-file-name filename)))))
2146 2146
2147 ;; Right, they are on the same host, regardless of user, method, etc. 2147 ;; Right, they are on the same host, regardless of user, method, etc.
2148 ;; We now make the link on the remote machine. This will occur as the user 2148 ;; We now make the link on the remote machine. This will occur as the user
@@ -4352,6 +4352,9 @@ ARGS are the arguments OPERATION has been called with."
4352 ;; When we are not fully sure that filename completion is safe, 4352 ;; When we are not fully sure that filename completion is safe,
4353 ;; we should not return a handler. 4353 ;; we should not return a handler.
4354 (when (or (tramp-file-name-method v) (tramp-file-name-user v) 4354 (when (or (tramp-file-name-method v) (tramp-file-name-user v)
4355 (and (tramp-file-name-host v)
4356 (not (member (tramp-file-name-host v)
4357 (mapcar 'car tramp-methods))))
4355 (not (tramp-completion-mode-p))) 4358 (not (tramp-completion-mode-p)))
4356 (while handler 4359 (while handler
4357 (setq elt (car handler) 4360 (setq elt (car handler)
@@ -5116,7 +5119,7 @@ User is always nil."
5116Only send the definition if it has not already been done." 5119Only send the definition if it has not already been done."
5117 (let* ((p (tramp-get-connection-process vec)) 5120 (let* ((p (tramp-get-connection-process vec))
5118 (scripts (tramp-get-connection-property p "scripts" nil))) 5121 (scripts (tramp-get-connection-property p "scripts" nil)))
5119 (unless (memq name scripts) 5122 (unless (member name scripts)
5120 (tramp-message vec 5 "Sending script `%s'..." name) 5123 (tramp-message vec 5 "Sending script `%s'..." name)
5121 ;; The script could contain a call of Perl. This is masked with `%s'. 5124 ;; The script could contain a call of Perl. This is masked with `%s'.
5122 (tramp-send-command-and-check 5125 (tramp-send-command-and-check
@@ -7193,19 +7196,19 @@ Only works for Bourne-like shells."
7193;; CCC: This check is now also really awful; we should search all 7196;; CCC: This check is now also really awful; we should search all
7194;; of the filename format, not just the prefix. 7197;; of the filename format, not just the prefix.
7195(when (string-match "\\[" tramp-prefix-format) 7198(when (string-match "\\[" tramp-prefix-format)
7196 (defadvice file-expand-wildcards (around tramp-fix activate) 7199 (defadvice file-expand-wildcards
7200 (around tramp-advice-file-expand-wildcards activate)
7197 (let ((name (ad-get-arg 0))) 7201 (let ((name (ad-get-arg 0)))
7198 (if (tramp-tramp-file-p name) 7202 (if (tramp-tramp-file-p name)
7199 ;; If it's a Tramp file, dissect it and look if wildcards 7203 ;; If it's a Tramp file, dissect it and look if wildcards
7200 ;; need to be expanded at all. 7204 ;; need to be expanded at all.
7201 (let ((v (tramp-dissect-file-name name))) 7205 (if (string-match
7202 (if (string-match "[[*?]" (tramp-file-name-localname v)) 7206 "[[*?]"
7203 (let ((res ad-do-it)) 7207 (tramp-file-name-localname (tramp-dissect-file-name name)))
7204 (setq ad-return-value (or res (list name)))) 7208 (setq ad-return-value (or ad-do-it (list name)))
7205 (setq ad-return-value (list name)))) 7209 (setq ad-return-value (list name)))
7206 ;; If it is not a Tramp file, just run the original function. 7210 ;; If it is not a Tramp file, just run the original function.
7207 (let ((res ad-do-it)) 7211 (setq ad-return-value (or ad-do-it (list name))))))
7208 (setq ad-return-value (or res (list name)))))))
7209 (add-hook 'tramp-unload-hook 7212 (add-hook 'tramp-unload-hook
7210 '(lambda () (ad-unadvise 'file-expand-wildcards)))) 7213 '(lambda () (ad-unadvise 'file-expand-wildcards))))
7211 7214