bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#17848: #17848 add suffix search to -l even when directory part in ar


From: npostavs
Subject: bug#17848: #17848 add suffix search to -l even when directory part in argument
Date: Mon, 05 Sep 2016 18:59:22 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: npostavs@users.sourceforge.net
>> Cc: 17848@debbugs.gnu.org,  rgm@gnu.org
>> Date: Sun, 04 Sep 2016 18:06:52 -0400
>> 
>> So now in the context of *this* bug, I think `locate-file' is needed.
>> The current directory needs to be searched for suffixed versions, but we
>> can't let `load' do that without adding "." to `load-path'.
>
> I'm not sure.  Wouldn't adding the leading directory to load-path in a
> let-binding be a cleaner solution?  IOW, I don't understand the reason
> for the "Take file from default dir if it exists there" logic in the
> first place -- what are we gaining there?

If we let-bind `load-path', then this could influence the code that
we're loading.  For more context, I came to this bug from
test/Makefile.in:

    ## We need to use $loadfile because:
    ## i) -L :$srcdir -l basename does not work, because we have files whose
    ## basename duplicates a file in lisp/ (eg eshell.el).
    ## ii) Although -l basename will automatically load .el or .elc,
    ## -l ./basename treats basename as a literal file (it would be nice
    ## to change this; bug#17848 - if that gets done, this can be simplified).






reply via email to

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