aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/net/ange-ftp.el11
-rw-r--r--lisp/net/tramp.el19
3 files changed, 30 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index fe321c3060b..9549676f155 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
12006-12-20 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/ange-ftp.el (ange-ftp-file-name-completion): Handle optional
4 parameter PREDICATE.
5
6 * lisp/tramp.el (tramp-handle-file-name-completion)
7 (tramp-completion-handle-file-name-completion): Handle optional
8 parameter PREDICATE.
9 (tramp-find-default-method): Add code for default values.
10
12006-12-20 Nick Roberts <nickrob@snap.net.nz> 112006-12-20 Nick Roberts <nickrob@snap.net.nz>
2 12
3 * progmodes/gdb-ui.el (gdb-stopped): After attaching to a process 13 * progmodes/gdb-ui.el (gdb-stopped): After attaching to a process
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index c77dbbd64b3..75c9b04a040 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -3977,7 +3977,7 @@ E.g.,
3977 ange-ftp-this-dir)) 3977 ange-ftp-this-dir))
3978 (ange-ftp-real-file-name-all-completions file ange-ftp-this-dir))))) 3978 (ange-ftp-real-file-name-all-completions file ange-ftp-this-dir)))))
3979 3979
3980(defun ange-ftp-file-name-completion (file dir) 3980(defun ange-ftp-file-name-completion (file dir &optional predicate)
3981 (let ((ange-ftp-this-dir (expand-file-name dir))) 3981 (let ((ange-ftp-this-dir (expand-file-name dir)))
3982 (if (ange-ftp-ftp-name ange-ftp-this-dir) 3982 (if (ange-ftp-ftp-name ange-ftp-this-dir)
3983 (progn 3983 (progn
@@ -4005,8 +4005,13 @@ E.g.,
4005 file 4005 file
4006 (nconc (ange-ftp-generate-root-prefixes) 4006 (nconc (ange-ftp-generate-root-prefixes)
4007 (ange-ftp-real-file-name-all-completions 4007 (ange-ftp-real-file-name-all-completions
4008 file ange-ftp-this-dir))) 4008 file ange-ftp-this-dir))
4009 (ange-ftp-real-file-name-completion file ange-ftp-this-dir))))) 4009 predicate)
4010 (if predicate
4011 (ange-ftp-real-file-name-completion
4012 file ange-ftp-this-dir predicate)
4013 (ange-ftp-real-file-name-completion
4014 file ange-ftp-this-dir))))))
4010 4015
4011 4016
4012(defun ange-ftp-file-name-completion-1 (file tbl dir &optional predicate) 4017(defun ange-ftp-file-name-completion-1 (file tbl dir &optional predicate)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 6a46486e6e1..3cdcfd74084 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -2856,7 +2856,8 @@ of."
2856 2856
2857 2857
2858;; The following isn't needed for Emacs 20 but for 19.34? 2858;; The following isn't needed for Emacs 20 but for 19.34?
2859(defun tramp-handle-file-name-completion (filename directory) 2859(defun tramp-handle-file-name-completion
2860 (filename directory &optional predicate)
2860 "Like `file-name-completion' for tramp files." 2861 "Like `file-name-completion' for tramp files."
2861 (unless (tramp-tramp-file-p directory) 2862 (unless (tramp-tramp-file-p directory)
2862 (error 2863 (error
@@ -2866,7 +2867,8 @@ of."
2866 (try-completion 2867 (try-completion
2867 filename 2868 filename
2868 (mapcar (lambda (x) (cons x nil)) 2869 (mapcar (lambda (x) (cons x nil))
2869 (file-name-all-completions filename directory))))) 2870 (file-name-all-completions filename directory))
2871 predicate)))
2870 2872
2871;; cp, mv and ln 2873;; cp, mv and ln
2872 2874
@@ -4627,10 +4629,13 @@ Falls back to normal file name handler if no tramp file name handler exists."
4627 4629
4628;; Method, host name and user name completion for a file. 4630;; Method, host name and user name completion for a file.
4629;;;###autoload 4631;;;###autoload
4630(defun tramp-completion-handle-file-name-completion (filename directory) 4632(defun tramp-completion-handle-file-name-completion
4633 (filename directory &optional predicate)
4631 "Like `file-name-completion' for tramp files." 4634 "Like `file-name-completion' for tramp files."
4632 (try-completion filename 4635 (try-completion
4633 (mapcar 'list (file-name-all-completions filename directory)))) 4636 filename
4637 (mapcar 'list (file-name-all-completions filename directory))
4638 predicate))
4634 4639
4635;; I misuse a little bit the tramp-file-name structure in order to handle 4640;; I misuse a little bit the tramp-file-name structure in order to handle
4636;; completion possibilities for partial methods / user names / host names. 4641;; completion possibilities for partial methods / user names / host names.
@@ -6965,8 +6970,8 @@ localname (file name on remote host)."
6965 item) 6970 item)
6966 (while choices 6971 (while choices
6967 (setq item (pop choices)) 6972 (setq item (pop choices))
6968 (when (and (string-match (nth 0 item) (or host "")) 6973 (when (and (string-match (or (nth 0 item) "") (or host ""))
6969 (string-match (nth 1 item) (or user ""))) 6974 (string-match (or (nth 1 item) "") (or user "")))
6970 (setq method (nth 2 item)) 6975 (setq method (nth 2 item))
6971 (setq choices nil))) 6976 (setq choices nil)))
6972 method)) 6977 method))