]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/net/ange-ftp.el (ange-ftp-expand-file-name): Use ange-ftp-ftp-name
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 2 Jul 2012 13:31:15 +0000 (09:31 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 2 Jul 2012 13:31:15 +0000 (09:31 -0400)
and file-name-absolute-p.
(ange-ftp-file-exists-p): Use ange-ftp-file-exists-p for
internal calls.

lisp/ChangeLog
lisp/net/ange-ftp.el

index cb09a630096d16abbe9c8aa864fa234743e076da..a514162e7ba5bd8969d678aba70d9261b3da29f7 100644 (file)
@@ -1,3 +1,10 @@
+2012-07-02  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * net/ange-ftp.el (ange-ftp-expand-file-name): Use ange-ftp-ftp-name
+       and file-name-absolute-p.
+       (ange-ftp-file-exists-p): Use ange-ftp-file-exists-p for
+       internal calls.
+
 2012-07-02  Paul Eggert  <eggert@cs.ucla.edu>
 
        Spelling fixes.
@@ -50,7 +57,7 @@
 
 2012-06-30  Stefan Monnier  <monnier@iro.umontreal.ca>
 
-       * emacs-lisp/cl-lib.el: Require macroexp for its macros.
+       * emacs-lisp/cl-lib.el: Require macroexp.
 
 2012-06-30  Chong Yidong  <cyd@gnu.org>
 
index 478261d02d00ba0f4870220c4d64d3abfc40848c..1d06a7fa72924c6a4e8788f1f5e9ffe362d32609 100644 (file)
@@ -3143,21 +3143,15 @@ logged in as user USER and cd'd to directory DIR."
   "Documented as `expand-file-name'."
   (save-match-data
     (setq default (or default default-directory))
-    (cond ((eq (string-to-char name) ?~)
-          (ange-ftp-real-expand-file-name name))
-         ((eq (string-to-char name) ?/)
-          (ange-ftp-canonize-filename name))
-         ((and (eq system-type 'windows-nt)
-               (eq (string-to-char name) ?\\))
-          (ange-ftp-canonize-filename name))
-         ((and (eq system-type 'windows-nt)
-               (or (string-match "\\`[a-zA-Z]:" name)
-                   (string-match "\\`[a-zA-Z]:" default)))
-          (ange-ftp-real-expand-file-name name default))
-         ((zerop (length name))
-          (ange-ftp-canonize-filename default))
-         ((ange-ftp-canonize-filename
-           (concat (file-name-as-directory default) name))))))
+    (cond
+     ((ange-ftp-ftp-name name)
+      ;; `default' is irrelevant.
+      (ange-ftp-canonize-filename name))
+     ((file-name-absolute-p name)
+      ;; `name' is absolute but is not an ange-ftp name => not ange-ftp.
+      (ange-ftp-real-expand-file-name name "/"))
+     ((ange-ftp-canonize-filename
+       (concat (file-name-as-directory default) name))))))
 \f
 ;;; These are problems--they are currently not enabled.
 
@@ -3390,7 +3384,7 @@ system TYPE.")
       (if (ange-ftp-file-entry-p name)
          (let ((file-ent (ange-ftp-get-file-entry name)))
            (if (stringp file-ent)
-               (file-exists-p
+               (ange-ftp-file-exists-p
                 (ange-ftp-expand-symlink file-ent
                                          (file-name-directory
                                           (directory-file-name name))))