;;; DO NOT MODIFY THIS FILE
(if (featurep 'tramp-autoloads) (error "Already loaded"))

;;;### (autoloads nil "_pkg" "lisp/_pkg.el")

(package-provide 'tramp :version 1.37 :author-version "2.0.55" :type 'regular)

;;;***

;;;### (autoloads (tramp-ftp-enable-ange-ftp) "tramp-ftp" "lisp/tramp-ftp.el")

(autoload 'tramp-ftp-enable-ange-ftp "tramp-ftp" nil nil nil)

;;;***

;;;### (autoloads (tramp-unload-tramp tramp-completion-handle-file-name-completion tramp-completion-handle-file-name-all-completions tramp-unload-file-name-handlers tramp-file-name-handler) "tramp" "lisp/tramp.el")

(defvar tramp-unified-filenames (not (featurep 'xemacs)) "\
Non-nil means to use unified Ange-FTP/Tramp filename syntax.
Otherwise, use a separate filename syntax for Tramp.")

(defconst tramp-file-name-regexp-unified "\\`/[^/:]+:" "\
Value for `tramp-file-name-regexp' for unified remoting.
Emacs (not XEmacs) uses a unified filename syntax for Ange-FTP and
Tramp.  See `tramp-file-name-structure-unified' for more explanations.")

(defconst tramp-file-name-regexp-separate "\\`/\\[.*\\]" "\
Value for `tramp-file-name-regexp' for separate remoting.
XEmacs uses a separate filename syntax for Tramp and EFS.
See `tramp-file-name-structure-separate' for more explanations.")

(defcustom tramp-file-name-regexp (if tramp-unified-filenames tramp-file-name-regexp-unified tramp-file-name-regexp-separate) "*Regular expression matching file names handled by tramp.\nThis regexp should match tramp file names but no other file names.\n(When tramp.el is loaded, this regular expression is prepended to\n`file-name-handler-alist', and that is searched sequentially.  Thus,\nif the tramp entry appears rather early in the `file-name-handler-alist'\nand is a bit too general, then some files might be considered tramp\nfiles which are not really tramp files.\n\nPlease note that the entry in `file-name-handler-alist' is made when\nthis file (tramp.el) is loaded.  This means that this variable must be set\nbefore loading tramp.el.  Alternatively, `file-name-handler-alist' can be\nupdated after changing this variable.\n\nAlso see `tramp-file-name-structure'." :group 'tramp :type 'regexp)

(defconst tramp-completion-file-name-regexp-unified "^/$\\|^/[^/:][^/]*$" "\
Value for `tramp-completion-file-name-regexp' for unified remoting.
Emacs (not XEmacs) uses a unified filename syntax for Ange-FTP and
Tramp.  See `tramp-file-name-structure-unified' for more explanations.")

(defconst tramp-completion-file-name-regexp-separate "^/\\([[][^]]*\\)?$" "\
Value for `tramp-completion-file-name-regexp' for separate remoting.
XEmacs uses a separate filename syntax for Tramp and EFS.
See `tramp-file-name-structure-separate' for more explanations.")

(defcustom tramp-completion-file-name-regexp (if tramp-unified-filenames tramp-completion-file-name-regexp-unified tramp-completion-file-name-regexp-separate) "*Regular expression matching file names handled by tramp completion.\nThis regexp should match partial tramp file names only.\n\nPlease note that the entry in `file-name-handler-alist' is made when\nthis file (tramp.el) is loaded.  This means that this variable must be set\nbefore loading tramp.el.  Alternatively, `file-name-handler-alist' can be\nupdated after changing this variable.\n\nAlso see `tramp-file-name-structure'." :group 'tramp :type 'regexp)

(defconst tramp-completion-file-name-handler-alist '((file-name-all-completions . tramp-completion-handle-file-name-all-completions) (file-name-completion . tramp-completion-handle-file-name-completion)) "\
Alist of completion handler functions.
Used for file names matching `tramp-file-name-regexp'. Operations not
mentioned here will be handled by `tramp-file-name-handler-alist' or the
normal Emacs functions.")

(progn (defun tramp-run-real-handler (operation args) "Invoke normal file name handler for OPERATION.\nFirst arg specifies the OPERATION, second arg is a list of arguments to\npass to the OPERATION." (let* ((inhibit-file-name-handlers (backquote (tramp-file-name-handler tramp-completion-file-name-handler cygwin-mount-name-hook-function cygwin-mount-map-drive-hook-function \, (and (eq inhibit-file-name-operation operation) inhibit-file-name-handlers)))) (inhibit-file-name-operation operation)) (apply operation args))))

(progn (defun tramp-completion-run-real-handler (operation args) "Invoke `tramp-file-name-handler' for OPERATION.\nFirst arg specifies the OPERATION, second arg is a list of arguments to\npass to the OPERATION." (let* ((inhibit-file-name-handlers (backquote (tramp-completion-file-name-handler cygwin-mount-name-hook-function cygwin-mount-map-drive-hook-function \, (and (eq inhibit-file-name-operation operation) inhibit-file-name-handlers)))) (inhibit-file-name-operation operation)) (apply operation args))))

(autoload 'tramp-file-name-handler "tramp" "\
Invoke Tramp file name handler.
Falls back to normal file name handler if no tramp file name handler exists." nil nil)

(progn (defun tramp-completion-file-name-handler (operation &rest args) "Invoke tramp file name completion handler.\nFalls back to normal file name handler if no tramp file name handler exists." (let ((fn (assoc operation tramp-completion-file-name-handler-alist))) (if fn (save-match-data (apply (cdr fn) args)) (tramp-completion-run-real-handler operation args)))))

(defsubst tramp-register-file-name-handlers nil "Add tramp file name handlers to `file-name-handler-alist'." (add-to-list 'file-name-handler-alist (cons tramp-file-name-regexp 'tramp-file-name-handler)) (when (or (not (boundp 'partial-completion-mode)) (symbol-value 'partial-completion-mode) (featurep 'ido)) (add-to-list 'file-name-handler-alist (cons tramp-completion-file-name-regexp 'tramp-completion-file-name-handler)) (put 'tramp-completion-file-name-handler 'safe-magic t)) (let ((jka (rassoc 'jka-compr-handler file-name-handler-alist))) (when jka (setq file-name-handler-alist (cons jka (delete jka file-name-handler-alist))))))
(add-hook
'after-init-hook
'(lambda () (tramp-register-file-name-handlers)))

(autoload 'tramp-unload-file-name-handlers "tramp" nil nil nil)

(autoload 'tramp-completion-handle-file-name-all-completions "tramp" "\
Like `file-name-all-completions' for partial tramp files." nil nil)

(autoload 'tramp-completion-handle-file-name-completion "tramp" "\
Like `file-name-completion' for tramp files." nil nil)

(autoload 'tramp-unload-tramp "tramp" "\
Discard Tramp from loading remote files." t nil)

;;;***

(provide 'tramp-autoloads)
