]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix bug#25788
authorMichael Albinus <michael.albinus@gmx.de>
Sun, 19 Feb 2017 08:33:24 +0000 (09:33 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Sun, 19 Feb 2017 08:33:24 +0000 (09:33 +0100)
* lisp/net/tramp.el (tramp-autoload-file-name-handler):
Do not load tramp.el just for "/".  (Bug#25788)

lisp/net/tramp.el

index 2bd75ab83f1cc9fe6861c90eeff5168ee3f22027..b05d55f9e045d48351c57cc9434d8a49b0bdfe37 100644 (file)
@@ -2156,11 +2156,14 @@ Falls back to normal file name handler if no Tramp file name handler exists."
 ;;;###autoload
 (progn (defun tramp-autoload-file-name-handler (operation &rest args)
   "Load Tramp file name handler, and perform OPERATION."
-  ;; Avoid recursive loading of tramp.el.
-  (if (let ((default-directory temporary-file-directory))
-        (and (null load-in-progress) (load "tramp" 'noerror 'nomessage)))
+  (if (and
+       ;; Do not load tramp.el just for "/".
+       (not (and (stringp (car args)) (string-equal (car args) "/")))
+       ;; Avoid recursive loading of tramp.el.
+       (let ((default-directory temporary-file-directory))
+        (and (null load-in-progress) (load "tramp" 'noerror 'nomessage))))
       (apply operation args)
-    ;; tramp.el not available for loading, fall back.
+    ;; tramp.el not needed or not available for loading, fall back.
     (tramp-completion-run-real-handler operation args))))
 
 ;; `tramp-autoload-file-name-handler' must be registered before