diff --git a/.scripts/elisp b/.scripts/elisp index 62fbc4bd..55af2cf2 100755 --- a/.scripts/elisp +++ b/.scripts/elisp @@ -3,7 +3,7 @@ _printhelp () { cat</dev/null 2>&1; then + echo 'emacs not found in PATH. Exiting.' >&2 + exit 1 +fi + +script="$1" if $OPT_BYTE && [ "${1##*.}" = "el" ]; then script="${1%.*}.elc" emacs -Q --batch -f batch-byte-compile "$1" -else - script="$1" - OPT_CLEAN=false fi +shift -emacs -Q --script "$script" +emacs -Q --script "$script" "$@" $OPT_CLEAN && rm "$script"