branch: elpa-admin commit ab46aeb4bbdf75a5180dec9111583cecf24a41d5 Author: rocky <ro...@gnu.org> Commit: rocky <ro...@gnu.org>
Relative loads for Emacs Lisp files. Adds functions __FILE__ and load-relative. --- README | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README b/README new file mode 100644 index 0000000..3ddcec8 --- /dev/null +++ b/README @@ -0,0 +1,19 @@ +Here we add two functions load-relative and __FILE__ + +load-relative(symbol) loads an Emacs Lisp file relative to another +(presumably currently running) Emacs Lisp file. + +Example: + +(provide 'foo-bar) +(load-relative "baz" 'foo-bar) + +__FILE__(symbol) returns the file that symbol was defined it, however +if you are currently running load, that file name is given instead. +If symbol is not defined and you are not loading a file, then nil is +returned. + +The symbol parameter is an artifact in both load-relative and __FILE__ +that I would like to remove. Right now I don't see how to. + +