aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2014-04-10 09:17:40 +0200
committerMichael Albinus2014-04-10 09:17:40 +0200
commitbcbb83a92d3a65f0c724a043836a8c60aa09f57c (patch)
treee6e47b431dda28dd118337a3f794d3a851fb2151
parent0cccc183d7530d342e7970f4544cdf70e3327cb6 (diff)
downloademacs-bcbb83a92d3a65f0c724a043836a8c60aa09f57c.tar.gz
emacs-bcbb83a92d3a65f0c724a043836a8c60aa09f57c.zip
* net/tramp.el (tramp-file-name-handler)
(tramp-completion-file-name-handler): Avoid recursive loading. * net/tramp-sh.el (tramp-make-copy-program-file-name): Quote result also locally.
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/net/tramp-sh.el7
-rw-r--r--lisp/net/tramp.el16
3 files changed, 26 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 09d5ff427bb..f37a67e5836 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
12014-04-10 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp.el (tramp-file-name-handler)
4 (tramp-completion-file-name-handler): Avoid recursive loading.
5
6 * net/tramp-sh.el (tramp-make-copy-program-file-name):
7 Quote result also locally.
8
12014-04-09 Dmitry Gutov <dgutov@yandex.ru> 92014-04-09 Dmitry Gutov <dgutov@yandex.ru>
2 10
3 * progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight more 11 * progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight more
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 22ea7714743..8ff29a8b426 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -4836,9 +4836,10 @@ Return ATTR."
4836 (host (tramp-file-name-real-host vec)) 4836 (host (tramp-file-name-real-host vec))
4837 (localname (tramp-shell-quote-argument 4837 (localname (tramp-shell-quote-argument
4838 (tramp-file-name-localname vec)))) 4838 (tramp-file-name-localname vec))))
4839 (if (not (zerop (length user))) 4839 (shell-quote-argument
4840 (format "%s@%s:%s" user host localname) 4840 (if (not (zerop (length user)))
4841 (format "%s:%s" host localname)))) 4841 (format "%s@%s:%s" user host localname)
4842 (format "%s:%s" host localname)))))
4842 4843
4843(defun tramp-method-out-of-band-p (vec size) 4844(defun tramp-method-out-of-band-p (vec size)
4844 "Return t if this is an out-of-band method, nil otherwise." 4845 "Return t if this is an out-of-band method, nil otherwise."
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 20948181414..51cc13fed7c 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -2106,7 +2106,16 @@ ARGS are the arguments OPERATION has been called with."
2106Falls back to normal file name handler if no Tramp file name handler exists." 2106Falls back to normal file name handler if no Tramp file name handler exists."
2107 (if tramp-mode 2107 (if tramp-mode
2108 (save-match-data 2108 (save-match-data
2109 (let* ((filename 2109 (let* ((default-directory
2110 ;; Some packages set the default directory to a
2111 ;; remote path, before tramp.el has been loaded.
2112 ;; This results in recursive loading. Therefore, we
2113 ;; set `default-directory' to a local path. `args'
2114 ;; could also be remote when loading tramp.el, but
2115 ;; that would be such perverse we don't care about.
2116 (if load-in-progress
2117 temporary-file-directory default-directory))
2118 (filename
2110 (tramp-replace-environment-variables 2119 (tramp-replace-environment-variables
2111 (apply 'tramp-file-name-for-operation operation args))) 2120 (apply 'tramp-file-name-for-operation operation args)))
2112 (completion (tramp-completion-mode-p)) 2121 (completion (tramp-completion-mode-p))
@@ -2218,8 +2227,11 @@ preventing reentrant calls of Tramp.")
2218 "Invoke Tramp file name completion handler. 2227 "Invoke Tramp file name completion handler.
2219Falls back to normal file name handler if no Tramp file name handler exists." 2228Falls back to normal file name handler if no Tramp file name handler exists."
2220 ;; We bind `directory-sep-char' here for XEmacs on Windows, which 2229 ;; We bind `directory-sep-char' here for XEmacs on Windows, which
2221 ;; would otherwise use backslash. 2230 ;; would otherwise use backslash. For `default-directory', see
2231 ;; comment in `tramp-file-name-handler'.
2222 (let ((directory-sep-char ?/) 2232 (let ((directory-sep-char ?/)
2233 (default-directory
2234 (if load-in-progress temporary-file-directory default-directory))
2223 (fn (assoc operation tramp-completion-file-name-handler-alist))) 2235 (fn (assoc operation tramp-completion-file-name-handler-alist)))
2224 (if (and 2236 (if (and
2225 ;; When `tramp-mode' is not enabled, we don't do anything. 2237 ;; When `tramp-mode' is not enabled, we don't do anything.