aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2019-12-13 16:36:57 +0100
committerMichael Albinus2019-12-13 16:36:57 +0100
commit84a8d07e7a3626402ff80dec1a1e6cfe69dddccf (patch)
treeab220126af9f8493a0ca29ffc7f45db88893aeea
parent51d3c95147efa80fd3e09c90705439517e8fb6ca (diff)
downloademacs-84a8d07e7a3626402ff80dec1a1e6cfe69dddccf.tar.gz
emacs-84a8d07e7a3626402ff80dec1a1e6cfe69dddccf.zip
* lisp/net/tramp.el (tramp-unload-tramp): Autoload function body.
-rw-r--r--lisp/net/tramp.el9
1 files changed, 6 insertions, 3 deletions
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.
4169Otherwise, return nil." 4169Otherwise, return nil."
4170 (goto-char (point-max)) 4170 (goto-char (point-max))
4171 ;; We restrict ourselves to the last 256 characters. There were 4171 ;; We restrict ourselves to the last 256 characters. There were
4172 ;; reports of 85kB output, which has blocked Tramp forever. 4172 ;; reports of a shell command "git ls-files -zco --exclude-standard"
4173 ;; with 85k files involved, which has blocked Tramp forever.
4173 (re-search-backward regexp (max (point-min) (- (point) 256)) 'noerror)) 4174 (re-search-backward regexp (max (point-min) (- (point) 256)) 'noerror))
4174 4175
4175(defun tramp-check-for-regexp (proc regexp) 4176(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."
4968;; - Reset `file-name-handler-alist' 4969;; - Reset `file-name-handler-alist'
4969;; - Cleanup hooks where Tramp functions are in 4970;; - Cleanup hooks where Tramp functions are in
4970;; - Cleanup autoloads 4971;; - Cleanup autoloads
4972;; We must autoload the function body. Otherwise, Tramp would be
4973;; loaded unconditionally if somebody calls `tramp-unload-tramp'.
4971;;;###autoload 4974;;;###autoload
4972(defun tramp-unload-tramp () 4975(progn (defun tramp-unload-tramp ()
4973 "Discard Tramp from loading remote files." 4976 "Discard Tramp from loading remote files."
4974 (interactive) 4977 (interactive)
4975 ;; Maybe it's not loaded yet. 4978 ;; Maybe it's not loaded yet.
4976 (ignore-errors (unload-feature 'tramp 'force))) 4979 (ignore-errors (unload-feature 'tramp 'force))))
4977 4980
4978(provide 'tramp) 4981(provide 'tramp)
4979 4982