emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/net/ange-ftp.el


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/net/ange-ftp.el
Date: Mon, 14 Jan 2002 08:00:43 -0500

Index: emacs/lisp/net/ange-ftp.el
diff -c emacs/lisp/net/ange-ftp.el:1.22 emacs/lisp/net/ange-ftp.el:1.23
*** emacs/lisp/net/ange-ftp.el:1.22     Sun Jan 13 05:03:49 2002
--- emacs/lisp/net/ange-ftp.el  Mon Jan 14 08:00:43 2002
***************
*** 2233,2240 ****
                      'identity)
                  cmd1)
            cmd3 (nth 3 cmd))
!       ;; Need to deal with the HP-UX ftp bug. This should also allow
!       ;; us to resolve symlinks to directories on SysV machines. (Sebastian 
will
        ;; be happy.)
        (and (eq host-type 'unix)
           (string-match "/$" cmd1)
--- 2233,2240 ----
                      'identity)
                  cmd1)
            cmd3 (nth 3 cmd))
!       ;; Need to deal with the HP-UX ftp bug. This should also allow us to
!       ;; resolve symlinks to directories on SysV machines. (Sebastian will
        ;; be happy.)
        (and (eq host-type 'unix)
           (string-match "/$" cmd1)
***************
*** 3876,3881 ****
--- 3876,3888 ----
        (or val ; is a directory name
          (not (string-match ange-ftp-completion-ignored-pattern symname))))))
  
+ (defun ange-ftp-root-dir-p (dir)
+   ;; Maybe we should use something more like
+   ;; (equal dir (file-name-directory (directory-file-name dir)))  -stef
+   (or (and (eq system-type 'windows-nt)
+          (string-match "^[a-zA-Z]:[/\\]$" dir))
+       (string-equal "/" dir)))
+ 
  (defun ange-ftp-file-name-all-completions (file dir)
    (let ((ange-ftp-this-dir (expand-file-name dir)))
      (if (ange-ftp-ftp-name ange-ftp-this-dir)
***************
*** 3901,3909 ****
                      file)))
             completions)))
  
!       (if (or (and (eq system-type 'windows-nt)
!                  (string-match "^[a-zA-Z]:[/\\]$" ange-ftp-this-dir))
!             (string-equal "/" ange-ftp-this-dir))
          (nconc (all-completions file (ange-ftp-generate-root-prefixes))
                 (ange-ftp-real-file-name-all-completions file
                                                          ange-ftp-this-dir))
--- 3908,3914 ----
                      file)))
             completions)))
  
!       (if (ange-ftp-root-dir-p ange-ftp-this-dir)
          (nconc (all-completions file (ange-ftp-generate-root-prefixes))
                 (ange-ftp-real-file-name-all-completions file
                                                          ange-ftp-this-dir))
***************
*** 3933,3941 ****
                     file tbl ange-ftp-this-dir
                     (function ange-ftp-file-entry-active-p)))))))
  
!       (if (or (and (eq system-type 'windows-nt)
!                  (string-match "^[a-zA-Z]:[/\\]$" ange-ftp-this-dir))
!             (string-equal "/" ange-ftp-this-dir))
          (try-completion
           file
           (nconc (ange-ftp-generate-root-prefixes)
--- 3938,3944 ----
                     file tbl ange-ftp-this-dir
                     (function ange-ftp-file-entry-active-p)))))))
  
!       (if (ange-ftp-root-dir-p ange-ftp-this-dir)
          (try-completion
           file
           (nconc (ange-ftp-generate-root-prefixes)
***************
*** 4201,4207 ****
  ;;;###autoload
  (defun ange-ftp-hook-function (operation &rest args)
    (let ((fn (get operation 'ange-ftp)))
!     (if fn (apply fn args)
        (ange-ftp-run-real-handler operation args))))
  
  
--- 4204,4210 ----
  ;;;###autoload
  (defun ange-ftp-hook-function (operation &rest args)
    (let ((fn (get operation 'ange-ftp)))
!     (if fn (save-match-data (apply fn args))
        (ange-ftp-run-real-handler operation args))))
  
  
***************
*** 4392,4398 ****
           (if wildcard
               (let ((default-directory (file-name-directory file)))
                 (ange-ftp-ls (file-name-nondirectory file) switches nil nil t))
!            (ange-ftp-ls file switches full))))q
        (ange-ftp-real-insert-directory file switches wildcard full))))
  
  (defun ange-ftp-dired-uncache (dir)
--- 4395,4401 ----
           (if wildcard
               (let ((default-directory (file-name-directory file)))
                 (ange-ftp-ls (file-name-nondirectory file) switches nil nil t))
!            (ange-ftp-ls file switches full))))
        (ange-ftp-real-insert-directory file switches wildcard full))))
  
  (defun ange-ftp-dired-uncache (dir)
***************
*** 4424,4431 ****
        (if (> (length name) 0)         ; else it's $HOME
          (setq command (concat "cd " name "; " command)))
        ;; Remove port from the hostname
!       (string-match "\\(.*\\)#\\(.*\\)" host)
!       (setq host (match-string 1 host))
        (setq command
            (format  "%s %s \"%s\""     ; remsh -l USER does not work well
                                        ; on a hp-ux machine I tried
--- 4427,4434 ----
        (if (> (length name) 0)         ; else it's $HOME
          (setq command (concat "cd " name "; " command)))
        ;; Remove port from the hostname
!       (when (string-match "\\(.*\\)#" host)
!       (setq host (match-string 1 host)))
        (setq command
            (format  "%s %s \"%s\""     ; remsh -l USER does not work well
                                        ; on a hp-ux machine I tried



reply via email to

[Prev in Thread] Current Thread [Next in Thread]