Function: ange-ftp-abbreviate-filename
ange-ftp-abbreviate-filename is a byte-compiled function defined in
ange-ftp.el.gz.
Signature
(ange-ftp-abbreviate-filename FILE &optional NEW)
Documentation
Abbreviate the file name FILE relative to the default-directory.
If the optional parameter NEW is given and the non-directory parts match, only return the directory part of FILE.
Source Code
;; Defined in /usr/src/emacs/lisp/net/ange-ftp.el.gz
(defun ange-ftp-abbreviate-filename (file &optional new)
"Abbreviate the file name FILE relative to the `default-directory'.
If the optional parameter NEW is given and the non-directory parts match,
only return the directory part of FILE."
(save-match-data
(if (and default-directory
(string-match (concat "\\`"
(regexp-quote default-directory)
".") file))
(setq file (substring file (1- (match-end 0)))))
(if (and new
(string-equal (file-name-nondirectory file)
(file-name-nondirectory new)))
(setq file (file-name-directory file)))
(or file "./")))