[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] elpa-admin 22e8332 018/357: Nope changing the name made things wo
From: |
Stefan Monnier |
Subject: |
[elpa] elpa-admin 22e8332 018/357: Nope changing the name made things worse. |
Date: |
Thu, 10 Dec 2020 18:06:06 -0500 (EST) |
branch: elpa-admin
commit 22e83324fd35736e914ac4b3914441875f6482da
Author: rocky <rocky@gnu.org>
Commit: rocky <rocky@gnu.org>
Nope changing the name made things worse.
---
README | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/README b/README
new file mode 100644
index 0000000..fb75923
--- /dev/null
+++ b/README
@@ -0,0 +1,53 @@
+h2. Emacs relative-file _load_, _require_ *==__FILE__==* and a _provide-me_
macro.
+
+Here we add functions: *load-relative*, *require-relative*,
+*require-relative-list*, *==__FILE__==*, and macro *provide-me*.
+
+The latest version is at
"http://github.com/rocky/emacs-load-relative/"://github.com/rocky/emacs-load-relative/
+
+h3. *==__FILE__==*
+
+*==__FILE__==* returns the file name that that the calling program is
+running. If you are _eval_'ing a buffer then the file name of that
+buffer is used. The name was selected to be analogous to the name its use in C
or Ruby.
+
+h3. _load-relative_
+
+_load-relative_ loads an Emacs Lisp file relative to another (presumably
currently running) Emacs Lisp file. For example if you have files _foo.el_ and
_bar.el_ in the same directory, then to load Emacs Lisp file _bar.el_ from
inside Emacs lisp file _foo.el_:
+
+bc. (require 'load-relative)
+ (load-relative "baz")
+
+That _load-relative_ line could above have also been written as:
+
+bc. (load-relative "./baz")
+
+or:
+
+bc. (load-relative "baz.el") # if you want to exclude any byte-compiled files
+
+h3. require-relative, require-relative-list
+
+If instead of loading file _baz_, you want to _require_ it:
+
+bc. (require-relative "baz")
+
+or
+
+bc. (require-relative "./baz")
+
+The above not only does a _require_ on _'baz_, but makes sure you get
+that from the same file as you would have if you had issued _load_relative_.
+
+If you have a list of files you want to _require_, you can require
+them one shot using _require-relative-list_ like this:
+
+bc. (require-relative-list '("dbgr-init" "dbgr-fringe"))
+
+h3. provide-me
+
+Finally, macro _provide-me_ saves you the trouble of adding a symbol
+after _provide_, by using the file basename (without directory or file
+extension) as the name of the thing you want to provide. Using this
+forces the _provide_ names to be the same as the filename, but I
+consider that a good thing.
- [elpa] branch elpa-admin created (now 311d819), Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 22e8332 018/357: Nope changing the name made things worse.,
Stefan Monnier <=
- [elpa] elpa-admin 3b5fe95 029/357: * admin/archive-contents.el: New file., Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 50fc47c 021/357: Update email addresses., Stefan Monnier, 2020/12/10
- [elpa] elpa-admin c2674b7 012/357: exclude html files from svn, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin dbbb145 035/357: Clearer reference to the license text, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin d9cdf2a 008/357: Added comment about installing with multiple emacsen., Stefan Monnier, 2020/12/10
- [elpa] elpa-admin da5ff0a 003/357: Added to CVS (formerly not under RCS)., Stefan Monnier, 2020/12/10
- [elpa] elpa-admin ae7a3df 034/357: Copy Emacs wiki page's content to new README file, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 051b643 041/357: README: Add a section about source code repository, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 5fefd44 048/357: Update archive-contents to add package versions from contents., Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 14ac0ef 040/357: Merge branch 'action', Stefan Monnier, 2020/12/10