[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 16:38:32 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
>> + (when (string-equal
>> + (file-remote-p (expand-file-name filename1))
>> + (file-remote-p (expand-file-name filename2)))
>
> The above args to string-equal aren't always strings: why not use
> `equal' instead?
> (string-equal nil "nil") is non-nil, so I think the code will work
> correctly but only because file-remote-p should hopefully never return
> "nil".
file-remote-p never returns "nil". It returns either the remote prefix
of a file name (a string), or nil.
> Stefan
Best regards, Michael.