Re:Please do not delete this commented-out version
by jhallenworld on Tuesday January 05, 2016 @08:58AM
(#10843239)
You are right, there must be some other function which does that.
Maybe the code predates the lisp interpreter.
expand-file-name doesn't do that; (expand-file-name "/foo//bar") produces "/foo/bar", just like any other pathname canonicalization.
I can't help but wonder why emacs doesn't write that function in lisp, rather than C.