emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] master 4d3a595: `load-path' should contain only direct


From: Stephen J. Turnbull
Subject: Re: [Emacs-diffs] master 4d3a595: `load-path' should contain only directory names
Date: Wed, 28 Oct 2015 13:21:39 +0900

Stefan Monnier writes:
 > > I see nothing wrong with recommending best practices in doc strings.
 > 
 > I don't see why "foo/bar" is better than "/foo/bar/", really.  So it's
 > not a question of best practice.

Actually, usually it's the other way around (unless you think it's a
good idea to make an effort to break risky code):

    (find-file (concat "/foo/bar/" "baz"))

and

    (find-file (concat "/foo/bar/" "/" "baz"))

both have the same semantics (at the file system level) as

    (find-file (expand-file-name "baz" "/foo/bar"))

while

    (find-file (concat "/foo/bar" "baz"))

and

    (find-file (concat "/foo/bar" "/" "baz"))

are always different from each other, and only the latter is
equivalent to the recommended use of expand-file-name.  That's
XEmacs's rationale for ensuring that our additions to load-path (and
other foo-path variables) are slash-terminated.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]