emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 938426d: Fix bug#25788


From: Michael Albinus
Subject: [Emacs-diffs] master 938426d: Fix bug#25788
Date: Sun, 19 Feb 2017 03:33:39 -0500 (EST)

branch: master
commit 938426d1ca0930b859c3e37b26513f5d74761284
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    Fix bug#25788
    
    * lisp/net/tramp.el (tramp-autoload-file-name-handler):
    Do not load tramp.el just for "/".  (Bug#25788)
---
 lisp/net/tramp.el | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 2bd75ab..b05d55f 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]