[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] master ef75c3b: Optimize `file-equal-p' and `file-in-d
From: |
Michael Albinus |
Subject: |
Re: [Emacs-diffs] master ef75c3b: Optimize `file-equal-p' and `file-in-directory-p' in Tramp |
Date: |
Wed, 11 Nov 2015 17:46:41 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
>> It returns either the remote prefix of a file name (a string), or nil.
>
> Can you really prove that "the remote prefix of a file name" will never
> be "nil"? Remember: your proof can only assume that one of filename1 or
> filename2 is a Tramp file name (the other can be anything at all,
> possibly matching any weird file-name-handler).
A Tramp file name will never return "nil" for the remote prefix. If the
other file is plagued by a weird file name handler which returns "nil":
no problem. string-equal returns nil, and that's what's expected.
> I think rather than try to prove it, it's easier to use `equal' and move on.
If you feel better, change it. I don't care too much about.
> Stefan
Best regards, Michael.