+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.
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>
"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.
(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))))