1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 19:51:17 +00:00

emacsWithPackages: fix logic of adding EMACSNATIVELOADPATH

Without this change, EMACSNATIVELOADPATH will not be added if
EMACSLOADPATH is added.
This commit is contained in:
Lin Jian 2023-08-25 10:30:25 +08:00 committed by Anderson Torres
parent a12258c461
commit d380784357

View file

@ -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:"