summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2008-08-20 14:05:47 +0000
committerUlrich Müller <ulm@gentoo.org>2008-08-20 14:05:47 +0000
commita7a3ad8f5c61f9ff9e9c0a33359361ad4c8bd69a (patch)
tree0d87cb54ba00dbdc642b4d5dc9767237d34661de /eclass
parentSync from Portage tree. (diff)
downloademacs-a7a3ad8f5c61f9ff9e9c0a33359361ad4c8bd69a.tar.gz
emacs-a7a3ad8f5c61f9ff9e9c0a33359361ad4c8bd69a.tar.bz2
emacs-a7a3ad8f5c61f9ff9e9c0a33359361ad4c8bd69a.zip
Add current directory to load-path in elisp-compile.
svn path=/emacs-overlay/; revision=1133
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog6
-rw-r--r--eclass/elisp-common.eclass20
2 files changed, 20 insertions, 6 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index 565d718..75c2599 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,3 +1,9 @@
+2008-08-20 Ulrich Mueller <ulm@gentoo.org>
+
+ * elisp-common.eclass (elisp-compile): Add current directory to
+ load-path, to ensure that interdependent elisp files are visible
+ between themselves.
+
2008-08-10 Ulrich Mueller <ulm@gentoo.org>
* elisp-common.eclass (elisp-site-regen): Fix issue with empty
diff --git a/eclass/elisp-common.eclass b/eclass/elisp-common.eclass
index 4dc9ed3..cc2c3eb 100644
--- a/eclass/elisp-common.eclass
+++ b/eclass/elisp-common.eclass
@@ -33,14 +33,14 @@
# src_compile() usage:
#
# An elisp file is compiled by the elisp-compile() function defined here and
-# simply takes the source files as arguments.
+# simply takes the source files as arguments. The case of interdependent
+# elisp files is also supported, since the current directory is added to the
+# load-path which makes sure that all files are loadable.
#
# elisp-compile *.el || die "elisp-compile failed"
#
-# In the case of interdependent elisp files, you can use the elisp-comp()
-# function which makes sure all files are loadable.
-#
-# elisp-comp *.el || die "elisp-comp failed"
+# Formerly, function elisp-comp() was used for compilation of interdependent
+# elisp files. This usage is considered as obsolete.
#
# Function elisp-make-autoload-file() can be used to generate a file with
# autoload definitions for the lisp functions. It takes the output file name
@@ -148,10 +148,18 @@ EMACSFLAGS="-batch -q --no-site-file"
# @USAGE: <list of elisp files>
# @DESCRIPTION:
# Byte-compile Emacs Lisp files.
+#
+# This function uses GNU Emacs to byte-compile all ".el" specified by its
+# arguments. The resulting byte-code (".elc") files are placed in the same
+# directory as their corresponding source file.
+#
+# The current directory is added to the load-path. This will ensure that
+# interdependent Emacs Lisp files are visible between themselves, in case they
+# require or load one another.
elisp-compile() {
ebegin "Compiling GNU Emacs Elisp files"
- ${EMACS} ${EMACSFLAGS} -f batch-byte-compile "$@"
+ ${EMACS} ${EMACSFLAGS} -L . -f batch-byte-compile "$@"
eend $? "batch-byte-compile failed"
}