From 7b71e40a00555461570cd5ddb7b402eac436c66a Mon Sep 17 00:00:00 2001 From: Ulrich Müller Date: Sat, 23 Jun 2007 21:50:10 +0000 Subject: Test numerical condition and return instead of exit in elisp-comp(). svn path=/emacs-overlay/; revision=465 --- eclass/ChangeLog | 4 ++-- 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 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 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} } -- cgit v1.2.3-65-gdbad