[Top][All Lists]

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

Re: On DOS/Windows, unnecessary load of tramp by `file-relative-name'

From: Stefan Monnier
Subject: Re: On DOS/Windows, unnecessary load of tramp by `file-relative-name'
Date: Tue, 29 Apr 2003 17:38:44 -0400

> After some investigation, I found that `file-relative-name' put a
> leading slash on file and directory names before comparing them to
> find the relative name.  On DOS/Windows, when the name begins with a
> drive letter, for example "c:/emacs", `file-relative-name' actually
> use this form internally: "/c:/emacs".  Unfortunately that form
> matches `tramp-file-name-regexp', which causes "tramp.el" to be loaded
> when `file-relative-name' then calls `file-name-as-directory'.
> !    (unless (eq (aref filename 0) ?/)
>        (setq filename (concat "/" filename)))
> !    (unless (eq (aref directory 0) ?/)
>        (setq directory (concat "/" directory)))

Actually even after the change to file-name-absolute-p, the above
code looks bogus since both `filename' and `directory' have
passed through expand-file-name and should thus be absolute

I suspect the four lines should purely and simply be removed.


reply via email to

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