Permalink
Browse files

Merge branch 'master' of github.com:rocky/emacs-load-relative

Conflicts:
	load-relative.el
  • Loading branch information...
2 parents 7de0162 + 9654e71 commit ff106d6801520a4bf95b3fc9934b6e69c8ef68af @rocky committed Apr 6, 2013
Showing with 9 additions and 4 deletions.
  1. +1 −1 Makefile.am
  2. +1 −0 THANKS
  3. +7 −3 load-relative.el
View
@@ -1,7 +1,7 @@
lisp_files := $(wildcard *.el)
lisp_LISP = $(lisp_files)
-EXTRA_DIST = $(lisp_files) $(test_files) README.textile COPYING
+EXTRA_DIST = $(lisp_files) $(test_files) README.textile THANKS COPYING
#: Run all tests
check: $(test-files)
View
@@ -0,0 +1 @@
+Lars Anderson - Melapa packaging, among other things
View
@@ -1,7 +1,7 @@
;;; load-relative.el --- relative file load (within a multi-file Emacs package)
;; Author: Rocky Bernstein
-;; Version: 0.02
+;; Version: 0.2.0
;; Keywords: internal
;; URL: http://github.com/rocky/emacs-load-relative
;; Compatibility: GNU Emacs 23.x
@@ -88,7 +88,7 @@
;; Using this constrains the `provide' name to be the same as
;; the filename, but I consider that a good thing.
-
+;;;###autoload
(defun __FILE__ (&optional symbol)
"Return the string name of file/buffer that is currently begin executed.
@@ -149,7 +149,7 @@ methods work we will use the file-name value find via
(defun autoload-relative (function-or-list
file &optional docstring interactive type
symbol)
- "autoload an Emacs Lisp file relative to Emacs Lisp code that is in
+ "Autoload an Emacs Lisp file relative to Emacs Lisp code that is in
the process of being loaded or eval'd.
@@ -183,6 +183,7 @@ finding __FILE__ don't work."
docstring interactive type))
)
+;;;###autoload
(defun load-relative (file-or-list &optional symbol)
"Load an Emacs Lisp file relative to Emacs Lisp code that is in
the process of being loaded or eval'd.
@@ -212,6 +213,7 @@ buffer-setting or buffer changing operations."
(setq prefix (file-name-directory file))
(expand-file-name (concat prefix relative-file))))
+;;;###autoload
(defun require-relative (relative-file &optional opt-file opt-prefix)
"Run `require' on an Emacs Lisp file relative to the Emacs Lisp code
that is in the process of being loaded or eval'd. The symbol used in require
@@ -226,6 +228,7 @@ buffer-setting or buffer changing operations."
(require (intern require-string-name)
(relative-expand-file-name relative-file opt-file))))
+;;;###autoload
(defmacro require-relative-list (list &optional opt-prefix)
"Run `require-relative' on each name in LIST which should be a list of
strings, each string being the relative name of file you want to run."
@@ -237,6 +240,7 @@ strings, each string being the relative name of file you want to run."
(dolist (rel-file ,list)
(require-relative rel-file (__FILE__) ,opt-prefix))))
+;;;###autoload
(defmacro provide-me ( &optional prefix )
"Call `provide' with the feature's symbol name made from
source-code's file basename sans extension. For example if you

0 comments on commit ff106d6

Please sign in to comment.