[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 84a8d07: * lisp/net/tramp.el (tramp-unload-tramp): Autoload funct
From: |
Michael Albinus |
Subject: |
master 84a8d07: * lisp/net/tramp.el (tramp-unload-tramp): Autoload function body. |
Date: |
Fri, 13 Dec 2019 10:37:04 -0500 (EST) |
branch: master
commit 84a8d07e7a3626402ff80dec1a1e6cfe69dddccf
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>
* lisp/net/tramp.el (tramp-unload-tramp): Autoload function body.
---
lisp/net/tramp.el | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index f419aec..8f5eb50 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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 84a8d07: * lisp/net/tramp.el (tramp-unload-tramp): Autoload function body.,
Michael Albinus <=