From 014f1cc06438f75c3fe267ae92e706855bba675d Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Tue, 16 May 2017 11:22:33 +0200 Subject: [PATCH] * lisp/net/tramp.el: Avoid recursive load of Tramp. (Bug#26943) --- lisp/net/tramp.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 8c317df9767..99cb7d19b0b 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -2058,8 +2058,14 @@ ARGS are the arguments OPERATION has been called with." `(let ((debug-on-error tramp-debug-on-error)) (tramp-compat-condition-case-unless-debug ,var ,bodyform ,@handlers))) +;; This is to avoid recursive load. +;;;###autoload(defun tramp-file-name-handler (operation &rest args) +;;;###autoload "Load Tramp file name handler, and perform OPERATION." +;;;###autoload (let ((default-directory temporary-file-directory)) +;;;###autoload (load "tramp" nil t)) +;;;###autoload (apply operation args)) + ;; Main function. -;;;###autoload (defun tramp-file-name-handler (operation &rest args) "Invoke Tramp file name handler. Falls back to normal file name handler if no Tramp file name handler exists." -- 2.39.2