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 Leake
Subject: Re: [Emacs-diffs] master 4d3a595: `load-path' should contain only directory names
Date: Mon, 26 Oct 2015 08:19:25 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt)

Eli Zaretskii <address@hidden> writes:

> Let's say "directory file name" in the doc string of 'load-path',
> since we've been doing that since time immemoriam.

See attached patch; if approved, I'll push it.
>
> Yes, and also a reference to 'directory-file-name' would be useful
> here.

Added "Use `directory-file-name' when adding items to this path."

>> And the info node should define "directory file name".
>
> Yup.  Patches welcome, thanks in advance.

Using "directory file name" consistently in that section makes it
cleaner, I think; see patch.

>> However, there is one more quirk; `default-directory' does end in a
>> slash, so having nil mean that in `load-path' is inconsistent. Should
>> that then be:
>> 
>>  ... or nil (meaning (directory-file-name default-directory)).
>> 
>> ?
>
> I don't think this subtlety is relevant.  The issue at hand is the
> _form_, not the _semantics_.  As far as the form is concerned, nil
> doesn't end in a slash, and you cannot use it in 'concat' for
> generating a file name with leading directories anyway; you must use
> 'expand-file-name', which already does TRT.

I added the suggestion to use `expand-file-name' in the info section. It
might make sense to suggest only that; I'm not clear if there is a speed
difference, but it's probably negligible.

-- 
-- Stephe

Attachment: dirnames.patch
Description: Text Data


reply via email to

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