aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/net
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/net')
-rw-r--r--lisp/net/ange-ftp.el27
1 files changed, 15 insertions, 12 deletions
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index 4530bb386e0..61b3f151645 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -2233,8 +2233,8 @@ and NOWAIT."
2233 'identity) 2233 'identity)
2234 cmd1) 2234 cmd1)
2235 cmd3 (nth 3 cmd)) 2235 cmd3 (nth 3 cmd))
2236 ;; Need to deal with the HP-UX ftp bug. This should also allow 2236 ;; Need to deal with the HP-UX ftp bug. This should also allow us to
2237 ;; us to resolve symlinks to directories on SysV machines. (Sebastian will 2237 ;; resolve symlinks to directories on SysV machines. (Sebastian will
2238 ;; be happy.) 2238 ;; be happy.)
2239 (and (eq host-type 'unix) 2239 (and (eq host-type 'unix)
2240 (string-match "/$" cmd1) 2240 (string-match "/$" cmd1)
@@ -3876,6 +3876,13 @@ E.g.,
3876 (or val ; is a directory name 3876 (or val ; is a directory name
3877 (not (string-match ange-ftp-completion-ignored-pattern symname)))))) 3877 (not (string-match ange-ftp-completion-ignored-pattern symname))))))
3878 3878
3879(defun ange-ftp-root-dir-p (dir)
3880 ;; Maybe we should use something more like
3881 ;; (equal dir (file-name-directory (directory-file-name dir))) -stef
3882 (or (and (eq system-type 'windows-nt)
3883 (string-match "^[a-zA-Z]:[/\\]$" dir))
3884 (string-equal "/" dir)))
3885
3879(defun ange-ftp-file-name-all-completions (file dir) 3886(defun ange-ftp-file-name-all-completions (file dir)
3880 (let ((ange-ftp-this-dir (expand-file-name dir))) 3887 (let ((ange-ftp-this-dir (expand-file-name dir)))
3881 (if (ange-ftp-ftp-name ange-ftp-this-dir) 3888 (if (ange-ftp-ftp-name ange-ftp-this-dir)
@@ -3901,9 +3908,7 @@ E.g.,
3901 file))) 3908 file)))
3902 completions))) 3909 completions)))
3903 3910
3904 (if (or (and (eq system-type 'windows-nt) 3911 (if (ange-ftp-root-dir-p ange-ftp-this-dir)
3905 (string-match "^[a-zA-Z]:[/\\]$" ange-ftp-this-dir))
3906 (string-equal "/" ange-ftp-this-dir))
3907 (nconc (all-completions file (ange-ftp-generate-root-prefixes)) 3912 (nconc (all-completions file (ange-ftp-generate-root-prefixes))
3908 (ange-ftp-real-file-name-all-completions file 3913 (ange-ftp-real-file-name-all-completions file
3909 ange-ftp-this-dir)) 3914 ange-ftp-this-dir))
@@ -3933,9 +3938,7 @@ E.g.,
3933 file tbl ange-ftp-this-dir 3938 file tbl ange-ftp-this-dir
3934 (function ange-ftp-file-entry-active-p))))))) 3939 (function ange-ftp-file-entry-active-p)))))))
3935 3940
3936 (if (or (and (eq system-type 'windows-nt) 3941 (if (ange-ftp-root-dir-p ange-ftp-this-dir)
3937 (string-match "^[a-zA-Z]:[/\\]$" ange-ftp-this-dir))
3938 (string-equal "/" ange-ftp-this-dir))
3939 (try-completion 3942 (try-completion
3940 file 3943 file
3941 (nconc (ange-ftp-generate-root-prefixes) 3944 (nconc (ange-ftp-generate-root-prefixes)
@@ -4201,7 +4204,7 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
4201;;;###autoload 4204;;;###autoload
4202(defun ange-ftp-hook-function (operation &rest args) 4205(defun ange-ftp-hook-function (operation &rest args)
4203 (let ((fn (get operation 'ange-ftp))) 4206 (let ((fn (get operation 'ange-ftp)))
4204 (if fn (apply fn args) 4207 (if fn (save-match-data (apply fn args))
4205 (ange-ftp-run-real-handler operation args)))) 4208 (ange-ftp-run-real-handler operation args))))
4206 4209
4207 4210
@@ -4392,7 +4395,7 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
4392 (if wildcard 4395 (if wildcard
4393 (let ((default-directory (file-name-directory file))) 4396 (let ((default-directory (file-name-directory file)))
4394 (ange-ftp-ls (file-name-nondirectory file) switches nil nil t)) 4397 (ange-ftp-ls (file-name-nondirectory file) switches nil nil t))
4395 (ange-ftp-ls file switches full))))q 4398 (ange-ftp-ls file switches full))))
4396 (ange-ftp-real-insert-directory file switches wildcard full)))) 4399 (ange-ftp-real-insert-directory file switches wildcard full))))
4397 4400
4398(defun ange-ftp-dired-uncache (dir) 4401(defun ange-ftp-dired-uncache (dir)
@@ -4424,8 +4427,8 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
4424 (if (> (length name) 0) ; else it's $HOME 4427 (if (> (length name) 0) ; else it's $HOME
4425 (setq command (concat "cd " name "; " command))) 4428 (setq command (concat "cd " name "; " command)))
4426 ;; Remove port from the hostname 4429 ;; Remove port from the hostname
4427 (string-match "\\(.*\\)#\\(.*\\)" host) 4430 (when (string-match "\\(.*\\)#" host)
4428 (setq host (match-string 1 host)) 4431 (setq host (match-string 1 host)))
4429 (setq command 4432 (setq command
4430 (format "%s %s \"%s\"" ; remsh -l USER does not work well 4433 (format "%s %s \"%s\"" ; remsh -l USER does not work well
4431 ; on a hp-ux machine I tried 4434 ; on a hp-ux machine I tried