From a7a3ad8f5c61f9ff9e9c0a33359361ad4c8bd69a Mon Sep 17 00:00:00 2001 From: Ulrich Müller Date: Wed, 20 Aug 2008 14:05:47 +0000 Subject: Add current directory to load-path in elisp-compile. svn path=/emacs-overlay/; revision=1133 --- eclass/ChangeLog | 6 ++++++ eclass/elisp-common.eclass | 20 ++++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) (limited to 'eclass') 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 + + * 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 * 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: # @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" } -- cgit v1.2.3-65-gdbad