1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-16 10:50:49 -08:00

* 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.
This commit is contained in:
Michael Albinus 2014-04-10 09:17:40 +02:00
parent 0cccc183d7
commit bcbb83a92d
3 changed files with 26 additions and 5 deletions

View file

@ -1,3 +1,11 @@
2014-04-10 Michael Albinus <michael.albinus@gmx.de>
* 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.
2014-04-09 Dmitry Gutov <dgutov@yandex.ru> 2014-04-09 Dmitry Gutov <dgutov@yandex.ru>
* progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight more * progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight more

View file

@ -4836,9 +4836,10 @@ Return ATTR."
(host (tramp-file-name-real-host vec)) (host (tramp-file-name-real-host vec))
(localname (tramp-shell-quote-argument (localname (tramp-shell-quote-argument
(tramp-file-name-localname vec)))) (tramp-file-name-localname vec))))
(if (not (zerop (length user))) (shell-quote-argument
(format "%s@%s:%s" user host localname) (if (not (zerop (length user)))
(format "%s:%s" host localname)))) (format "%s@%s:%s" user host localname)
(format "%s:%s" host localname)))))
(defun tramp-method-out-of-band-p (vec size) (defun tramp-method-out-of-band-p (vec size)
"Return t if this is an out-of-band method, nil otherwise." "Return t if this is an out-of-band method, nil otherwise."

View file

@ -2106,7 +2106,16 @@ ARGS are the arguments OPERATION has been called with."
Falls back to normal file name handler if no Tramp file name handler exists." Falls back to normal file name handler if no Tramp file name handler exists."
(if tramp-mode (if tramp-mode
(save-match-data (save-match-data
(let* ((filename (let* ((default-directory
;; Some packages set the default directory to a
;; remote path, before tramp.el has been loaded.
;; This results in recursive loading. Therefore, we
;; set `default-directory' to a local path. `args'
;; could also be remote when loading tramp.el, but
;; that would be such perverse we don't care about.
(if load-in-progress
temporary-file-directory default-directory))
(filename
(tramp-replace-environment-variables (tramp-replace-environment-variables
(apply 'tramp-file-name-for-operation operation args))) (apply 'tramp-file-name-for-operation operation args)))
(completion (tramp-completion-mode-p)) (completion (tramp-completion-mode-p))
@ -2218,8 +2227,11 @@ preventing reentrant calls of Tramp.")
"Invoke Tramp file name completion handler. "Invoke Tramp file name completion handler.
Falls back to normal file name handler if no Tramp file name handler exists." Falls back to normal file name handler if no Tramp file name handler exists."
;; We bind `directory-sep-char' here for XEmacs on Windows, which ;; We bind `directory-sep-char' here for XEmacs on Windows, which
;; would otherwise use backslash. ;; would otherwise use backslash. For `default-directory', see
;; comment in `tramp-file-name-handler'.
(let ((directory-sep-char ?/) (let ((directory-sep-char ?/)
(default-directory
(if load-in-progress temporary-file-directory default-directory))
(fn (assoc operation tramp-completion-file-name-handler-alist))) (fn (assoc operation tramp-completion-file-name-handler-alist)))
(if (and (if (and
;; When `tramp-mode' is not enabled, we don't do anything. ;; When `tramp-mode' is not enabled, we don't do anything.