diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2011-07-22 13:04:55 +0200 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2011-07-22 13:04:55 +0200 |
commit | 11d074b2952909def6ab8e0f8313e84ec440cdc9 (patch) | |
tree | f778d08b23076b6fb3251a63892c2ceea5a857a5 /lisp/net/tramp.el | |
parent | 043604ee51e5b5e0d0f645b999a35a1609a16b24 (diff) | |
download | emacs-11d074b2952909def6ab8e0f8313e84ec440cdc9.tar.gz emacs-11d074b2952909def6ab8e0f8313e84ec440cdc9.tar.bz2 emacs-11d074b2952909def6ab8e0f8313e84ec440cdc9.zip |
* net/tramp.el (tramp-file-name-handler): Avoid recursive
loading. (Bug#9114)
Diffstat (limited to 'lisp/net/tramp.el')
-rw-r--r-- | lisp/net/tramp.el | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 82d878a6fa8..9b11ef58eab 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1876,7 +1876,17 @@ Falls back to normal file name handler if no Tramp file name handler exists." ;; Call the backend function. (if foreign (condition-case err - (apply foreign operation args) + (let ((sf (symbol-function foreign))) + ;; Some packages set the default directory to a + ;; remote path, before respective Tramp packages + ;; are already loaded. This results in + ;; recursive loading. Therefore, we load the + ;; Tramp packages locally. + (when (and (listp sf) (eq (car sf) 'autoload)) + (let ((default-directory + (tramp-compat-temporary-file-directory))) + (load (cadr sf) 'noerror))) + (apply foreign operation args)) ;; Trace that somebody has interrupted the operation. (quit |