[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: file-subdir-of-p should also apply to files
From: |
Stefan Monnier |
Subject: |
Re: file-subdir-of-p should also apply to files |
Date: |
Sat, 31 Mar 2012 11:09:11 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) |
>> Rather than (file-subdir-of-p DIR1 DIR2) we should have
>> (file-within-p FILE DIR).
> Why and where?
Why not?
> It is not a problem to copy a single file of TREE to a subdirectory of
> TREE, but it is a problem to copy TREE to one of its subdirectories,
> isn't it?
We're not talking about copying but about file-subdir-of-p.
The copy operation only uses file-subdir-of-p with a first argument
which is a directory, but that doesn't mean we shouldn't also handle
the case where the first argument is a file (which occurs in some
places which currently use string-prefix-p).
Stefan