> (equal
> (and
> (string-match re filename)
> (substring filename 0 (match-end 0)))
> (and
> (string-match re directory)
> (substring directory 0 (match-end 0)))))))))
I'm not sure it's a good idea to check this stuff here. Maybe it
would be better to let each filename handler do that.
For example, Tramp has the concept of a default method, so
/user@host:/file and /ssh:user@host:/file denote the same file by
default, even though the strings are different.
It seems to me that it is better to let the handler decide.