emacs-devel
[Top][All Lists]
Advanced

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

Re: relative load-file


From: Richard Stallman
Subject: Re: relative load-file
Date: Sat, 14 Nov 2009 06:24:03 -0500

The basic idea of `require' is that you specify a feature which gets
found through a search of all libraries.  The idea is that these are
general features which anything might want to use.

You want something different:

    That is, one wants to
    load an Emacs Lisp file relative the file that issues the load which is
    often in the same directory or a nearby directory.

It seems to me that this is useful only for loading other parts of one
single multi-file program.

If you have a program which is in multiple files, you can write a
function similar to `require' which searches for files in any way you
like, and then you can use it.  The function can be in your program;
it does not need to be built-in.  It can load the chosen file using
`load'.

The files should each use `provide' in the usual way, and your
function should use the variable `features' to see if the desired
feature has already been loaded.  The only difference would be in
choosing which file to load.





reply via email to

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