Commit d3807843 authored by Lin Jian's avatar Lin Jian Committed by Anderson Torres
Browse files

emacsWithPackages: fix logic of adding EMACSNATIVELOADPATH

Without this change, EMACSNATIVELOADPATH will not be added if
EMACSLOADPATH is added.
parent a12258c4
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -4,16 +4,17 @@ IFS=:

newLoadPath=()
newNativeLoadPath=()
added=
addedNewLoadPath=
addedNewNativeLoadPath=

if [[ -n $EMACSLOADPATH ]]
then
    while read -rd: entry
    do
        if [[ -z $entry && -z $added ]]
        if [[ -z $entry && -z $addedNewLoadPath ]]
        then
            newLoadPath+=(@wrapperSiteLisp@)
            added=1
            addedNewLoadPath=1
        fi
        newLoadPath+=("$entry")
    done <<< "$EMACSLOADPATH:"
@@ -26,10 +27,10 @@ if [[ -n $EMACSNATIVELOADPATH ]]
then
    while read -rd: entry
    do
        if [[ -z $entry && -z $added ]]
        if [[ -z $entry && -z $addedNewNativeLoadPath ]]
        then
            newNativeLoadPath+=(@wrapperSiteLispNative@)
            added=1
            addedNewNativeLoadPath=1
        fi
        newNativeLoadPath+=("$entry")
    done <<< "$EMACSNATIVELOADPATH:"