From: Michael Albinus Date: Fri, 13 Dec 2019 15:36:57 +0000 (+0100) Subject: * lisp/net/tramp.el (tramp-unload-tramp): Autoload function body. X-Git-Tag: emacs-27.0.90~359 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=84a8d07e7a3626402ff80dec1a1e6cfe69dddccf;p=emacs.git * lisp/net/tramp.el (tramp-unload-tramp): Autoload function body. --- diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index f419aecbe77..8f5eb5096a2 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -4169,7 +4169,8 @@ If found, set point to the end of the occurrence found, and return point. Otherwise, return nil." (goto-char (point-max)) ;; We restrict ourselves to the last 256 characters. There were - ;; reports of 85kB output, which has blocked Tramp forever. + ;; reports of a shell command "git ls-files -zco --exclude-standard" + ;; with 85k files involved, which has blocked Tramp forever. (re-search-backward regexp (max (point-min) (- (point) 256)) 'noerror)) (defun tramp-check-for-regexp (proc regexp) @@ -4968,12 +4969,14 @@ name of a process or buffer, or nil to default to the current buffer." ;; - Reset `file-name-handler-alist' ;; - Cleanup hooks where Tramp functions are in ;; - Cleanup autoloads +;; We must autoload the function body. Otherwise, Tramp would be +;; loaded unconditionally if somebody calls `tramp-unload-tramp'. ;;;###autoload -(defun tramp-unload-tramp () +(progn (defun tramp-unload-tramp () "Discard Tramp from loading remote files." (interactive) ;; Maybe it's not loaded yet. - (ignore-errors (unload-feature 'tramp 'force))) + (ignore-errors (unload-feature 'tramp 'force)))) (provide 'tramp)