emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] elpa-admin ab46aeb 014/357: Relative loads for Emacs Lisp files.


From: Stefan Monnier
Subject: [elpa] elpa-admin ab46aeb 014/357: Relative loads for Emacs Lisp files. Adds functions __FILE__ and
Date: Thu, 10 Dec 2020 18:06:05 -0500 (EST)

branch: elpa-admin
commit ab46aeb4bbdf75a5180dec9111583cecf24a41d5
Author: rocky <rocky@gnu.org>
Commit: rocky <rocky@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.
+
+



reply via email to

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