(defvar tramp-current-connection nil
"Last connection timestamp.")
-;;;###autoload
(defconst tramp-completion-file-name-handler-alist
'((expand-file-name . tramp-completion-handle-expand-file-name)
(file-name-all-completions
;; Tramp file name syntax. Maybe another variable should be introduced
;; overwriting this check in such cases. Or we change Tramp file name
;; syntax in order to avoid ambiguities.
-;;;###autoload
-(progn (defun tramp-completion-mode-p ()
+(defun tramp-completion-mode-p ()
"Check, whether method / user name / host name completion is active."
(or
;; Signal from outside. `non-essential' has been introduced in Emacs 24.
(equal last-input-event ?\t)
(and (not (event-modifiers last-input-event))
(or (equal last-input-event ?\?)
- (equal last-input-event ?\ ))))))))
+ (equal last-input-event ?\ )))))))
(defun tramp-connectable-p (filename)
"Check, whether it is possible to connect the remote host w/o side-effects.
(p (tramp-get-connection-process v)))
(and p (processp p) (memq (process-status p) '(run open))))))))
-;;;###autoload
(defun tramp-completion-handle-expand-file-name
(name &optional dir)
"Like `expand-file-name' for Tramp files."
;; Method, host name and user name completion.
;; `tramp-completion-dissect-file-name' returns a list of
;; tramp-file-name structures. For all of them we return possible completions.
-;;;###autoload
(defun tramp-completion-handle-file-name-all-completions (filename directory)
"Like `file-name-all-completions' for partial Tramp files."
'file-name-all-completions (list (list filename directory)))))))
;; Method, host name and user name completion for a file.
-;;;###autoload
(defun tramp-completion-handle-file-name-completion
(filename directory &optional predicate)
"Like `file-name-completion' for Tramp files."