diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2021-02-28 18:23:27 +0100 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2021-02-28 18:23:27 +0100 |
commit | 0fd206badc761df0a2eb18cd5d9c7506c3bd0d2a (patch) | |
tree | 731a3c3fc6f2fee96c4e7eef90c8405a8ef5e98d /lisp/net/tramp-cmds.el | |
parent | 277a254a42ad4ccf2223eaa788de37279e5e3958 (diff) | |
download | emacs-0fd206badc761df0a2eb18cd5d9c7506c3bd0d2a.tar.gz |
Add `completion-predicate' to some Tramp commands
* lisp/net/tramp-cmds.el (tramp-cleanup-this-connection)
(tramp-rename-these-files): Add property `completion-predicate'.
* lisp/net/tramp.el (tramp-command-completion-p): New defun.
Diffstat (limited to 'lisp/net/tramp-cmds.el')
-rw-r--r-- | lisp/net/tramp-cmds.el | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el index f0bbe31cea0..2aacf266f2b 100644 --- a/lisp/net/tramp-cmds.el +++ b/lisp/net/tramp-cmds.el @@ -144,11 +144,18 @@ When called interactively, a Tramp connection has to be selected." ;;;###tramp-autoload (defun tramp-cleanup-this-connection () "Flush all connection related objects of the current buffer's connection." + ;; (declare (completion tramp-command-completion-p))) (interactive) (and (tramp-tramp-file-p default-directory) (tramp-cleanup-connection (tramp-dissect-file-name default-directory 'noexpand)))) +;; Starting with Emacs 28.1, this can be replaced by the "(declare ...)" form. +;;;###tramp-autoload +(function-put + #'tramp-cleanup-this-connection 'completion-predicate + #'tramp-command-completion-p) + ;;;###tramp-autoload (defvar tramp-cleanup-all-connections-hook nil "List of functions to be called after all Tramp connections are cleaned up.") @@ -431,6 +438,7 @@ Interactively, TARGET is selected from `tramp-default-rename-alist' without confirmation if the prefix argument is non-nil. For details, see `tramp-rename-files'." + ;; (declare (completion tramp-command-completion-p)) (interactive (let ((source default-directory) target @@ -461,6 +469,11 @@ For details, see `tramp-rename-files'." (tramp-rename-files default-directory target)) +;; Starting with Emacs 28.1, this can be replaced by the "(declare ...)" form. +;;;###tramp-autoload +(function-put + #'tramp-rename-these-files 'completion-predicate #'tramp-command-completion-p) + ;; Tramp version is useful in a number of situations. ;;;###tramp-autoload |