Jason Rumney <[EMAIL PROTECTED]> writes:

> Chong Yidong wrote:
>>   Convert filename name to absolute, and canonicalize it.
>>
>> All your examples are consistent with this behavior.  The important
>> thing is that DEFAULT-DIRECTORY is only consulted if the filename is
>> relative.
>>   
> But shouldn't the "and canonicalize it" step involve replacing the ../
> with the actual directories they represent?

Hmm, that's true.  It seems that Emacs treats both / and /../ as
semi-independent canonical directories, which is a little
counter-intuitive.

(expand-file-name "/../a")
"/../a"

(expand-file-name "/../../a")
"/a"

On the other hand, I just checked, and this behavior seems to have
been around since at least Emacs 20.  Glancing through the source
code, this behavior seems to be deliberate---something to do with the
"superroot directory".  Maybe someone on this list can elucidate?



_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to