/[emacs]/emacs/lisp/net/ange-ftp.el
ViewVC logotype

Diff of /emacs/lisp/net/ange-ftp.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.22 by pj, Sun Jan 13 10:03:49 2002 UTC revision 1.23 by monnier, Mon Jan 14 13:00:43 2002 UTC
# Line 2233  and NOWAIT." Line 2233  and NOWAIT."
2233                        'identity)                        'identity)
2234                    cmd1)                    cmd1)
2235              cmd3 (nth 3 cmd))              cmd3 (nth 3 cmd))
2236        ;; Need to deal with the HP-UX ftp bug. This should also allow        ;; 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        ;; resolve symlinks to directories on SysV machines. (Sebastian will
2238        ;; be happy.)        ;; be happy.)
2239        (and (eq host-type 'unix)        (and (eq host-type 'unix)
2240             (string-match "/$" cmd1)             (string-match "/$" cmd1)
# Line 3876  E.g., Line 3876  E.g.,
3876        (or val ; is a directory name        (or val ; is a directory name
3877            (not (string-match ange-ftp-completion-ignored-pattern symname))))))            (not (string-match ange-ftp-completion-ignored-pattern symname))))))
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    
3886  (defun ange-ftp-file-name-all-completions (file dir)  (defun ange-ftp-file-name-all-completions (file dir)
3887    (let ((ange-ftp-this-dir (expand-file-name dir)))    (let ((ange-ftp-this-dir (expand-file-name dir)))
3888      (if (ange-ftp-ftp-name ange-ftp-this-dir)      (if (ange-ftp-ftp-name ange-ftp-this-dir)
# Line 3901  E.g., Line 3908  E.g.,
3908                      file)))                      file)))
3909               completions)))               completions)))
3910    
3911        (if (or (and (eq system-type 'windows-nt)        (if (ange-ftp-root-dir-p ange-ftp-this-dir)
                    (string-match "^[a-zA-Z]:[/\\]$" ange-ftp-this-dir))  
               (string-equal "/" ange-ftp-this-dir))  
3912            (nconc (all-completions file (ange-ftp-generate-root-prefixes))            (nconc (all-completions file (ange-ftp-generate-root-prefixes))
3913                   (ange-ftp-real-file-name-all-completions file                   (ange-ftp-real-file-name-all-completions file
3914                                                            ange-ftp-this-dir))                                                            ange-ftp-this-dir))
# Line 3933  E.g., Line 3938  E.g.,
3938                       file tbl ange-ftp-this-dir                       file tbl ange-ftp-this-dir
3939                       (function ange-ftp-file-entry-active-p)))))))                       (function ange-ftp-file-entry-active-p)))))))
3940    
3941        (if (or (and (eq system-type 'windows-nt)        (if (ange-ftp-root-dir-p ange-ftp-this-dir)
                    (string-match "^[a-zA-Z]:[/\\]$" ange-ftp-this-dir))  
               (string-equal "/" ange-ftp-this-dir))  
3942            (try-completion            (try-completion
3943             file             file
3944             (nconc (ange-ftp-generate-root-prefixes)             (nconc (ange-ftp-generate-root-prefixes)
# Line 4201  NEWNAME should be the name to give the n Line 4204  NEWNAME should be the name to give the n
4204  ;;;###autoload  ;;;###autoload
4205  (defun ange-ftp-hook-function (operation &rest args)  (defun ange-ftp-hook-function (operation &rest args)
4206    (let ((fn (get operation 'ange-ftp)))    (let ((fn (get operation 'ange-ftp)))
4207      (if fn (apply fn args)      (if fn (save-match-data (apply fn args))
4208        (ange-ftp-run-real-handler operation args))))        (ange-ftp-run-real-handler operation args))))
4209    
4210    
# Line 4392  NEWNAME should be the name to give the n Line 4395  NEWNAME should be the name to give the n
4395             (if wildcard             (if wildcard
4396                 (let ((default-directory (file-name-directory file)))                 (let ((default-directory (file-name-directory file)))
4397                   (ange-ftp-ls (file-name-nondirectory file) switches nil nil t))                   (ange-ftp-ls (file-name-nondirectory file) switches nil nil t))
4398               (ange-ftp-ls file switches full))))q               (ange-ftp-ls file switches full))))
4399        (ange-ftp-real-insert-directory file switches wildcard full))))        (ange-ftp-real-insert-directory file switches wildcard full))))
4400    
4401  (defun ange-ftp-dired-uncache (dir)  (defun ange-ftp-dired-uncache (dir)
# Line 4424  NEWNAME should be the name to give the n Line 4427  NEWNAME should be the name to give the n
4427        (if (> (length name) 0)           ; else it's $HOME        (if (> (length name) 0)           ; else it's $HOME
4428            (setq command (concat "cd " name "; " command)))            (setq command (concat "cd " name "; " command)))
4429        ;; Remove port from the hostname        ;; Remove port from the hostname
4430        (string-match "\\(.*\\)#\\(.*\\)" host)        (when (string-match "\\(.*\\)#" host)
4431        (setq host (match-string 1 host))          (setq host (match-string 1 host)))
4432        (setq command        (setq command
4433              (format  "%s %s \"%s\""     ; remsh -l USER does not work well              (format  "%s %s \"%s\""     ; remsh -l USER does not work well
4434                                          ; on a hp-ux machine I tried                                          ; on a hp-ux machine I tried

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26