From: Michael Albinus <michael.albinus@gmx.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
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 [thread overview]
Message-ID: <87twos1r7r.fsf@gmx.de> (raw)
In-Reply-To: <jwvpozgppp6.fsf-monnier+emacsdiffs@gnu.org> (Stefan Monnier's message of "Wed, 11 Nov 2015 09:40:07 -0500")
Stefan Monnier <monnier@iro.umontreal.ca> 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.
next prev parent reply other threads:[~2015-11-11 15:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20151111104737.22161.11802@vcs.savannah.gnu.org>
[not found] ` <E1ZwSwD-0005m3-U8@vcs.savannah.gnu.org>
2015-11-11 14:40 ` [Emacs-diffs] master ef75c3b: Optimize `file-equal-p' and `file-in-directory-p' in Tramp Stefan Monnier
2015-11-11 15:38 ` Michael Albinus [this message]
2015-11-11 16:07 ` Stefan Monnier
2015-11-11 16:46 ` Michael Albinus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87twos1r7r.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).