diff options
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ChangeLog | 4 | ||||
-rw-r--r-- | eclass/elisp-common.eclass | 36 |
2 files changed, 19 insertions, 21 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index 644a0ea..6aaed91 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -2,8 +2,8 @@ # $Header: $ 23 Jun 2007; Ulrich Mueller <ulm@gentoo.org> elisp-common.eclass: - Check for Emacs return status in elisp-comp. Call Emacs with arguments - in their canonical form. + Check for Emacs return status in elisp-comp. Test numerical condition and + return instead of exit. Call Emacs with arguments in their canonical form. 21 Jun 2007; Christian Faulhammer <opfer@gentoo.org> elisp-common.eclass: added a comment when the site-start generation hints reveal nearly no output diff --git a/eclass/elisp-common.eclass b/eclass/elisp-common.eclass index b3d6950..6303c2f 100644 --- a/eclass/elisp-common.eclass +++ b/eclass/elisp-common.eclass @@ -239,28 +239,26 @@ elisp-comp() { # be compiled are made visible between themselves, in the event # they require or load-library one another. - if test $# = 0; then - exit 1 - else - if test -z "${EMACS}" || test "${EMACS}" = "t"; then + test $# -gt 0 || return 1 + + if test -z "${EMACS}" || test "${EMACS}" = "t"; then # Value of "t" means we are running in a shell under Emacs. # Just assume Emacs is called "emacs". - EMACS=emacs - fi + EMACS=/usr/bin/emacs + fi - tempdir=elc.$$ - mkdir ${tempdir} - cp $* ${tempdir} - cd ${tempdir} + tempdir=elc.$$ + mkdir ${tempdir} + cp $* ${tempdir} + cd ${tempdir} - echo "(add-to-list 'load-path \"../\")" > script - ${EMACS} -batch -q --no-site-file --no-init-file -l script \ - -f batch-byte-compile *.el - local status=$? - mv *.elc .. + echo "(add-to-list 'load-path \"../\")" > script + ${EMACS} -batch -q --no-site-file --no-init-file -l script \ + -f batch-byte-compile *.el + local status=$? + mv *.elc .. - cd .. - rm -fr ${tempdir} - return ${status} - fi + cd .. + rm -fr ${tempdir} + return ${status} } |