summaryrefslogtreecommitdiff
path: root/bin/emacsclient
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-06-06 01:04:24 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-06-09 08:27:45 -0500
commit5ebfaa6e61a1cac1473da768470f1ba298c3de3a (patch)
tree59e2030394941b757e32d8c508ef5eb65d6c4c86 /bin/emacsclient
parent167a7953699a7797d797a14136393086eb932857 (diff)
downloaddotfiles-5ebfaa6e61a1cac1473da768470f1ba298c3de3a.tar.gz
implement updating Lisp image env vars & refactor
Diffstat (limited to 'bin/emacsclient')
-rwxr-xr-xbin/emacsclient5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/emacsclient b/bin/emacsclient
index 91cef0aa..e11cbe9c 100755
--- a/bin/emacsclient
+++ b/bin/emacsclient
@@ -77,10 +77,11 @@ if [ "$update" = true \
eval isset=\${$var+x}
if [ "$isset" = "x" ]; then
eval val=\$$var
- args="$args"' (setenv "'$var'" "'$val'")'
+ args="$args"' "'$var'" "'$val'"'
fi
done
- "$emacsclient" --eval "(progn$args (spw/propagate-new-environment))"
+ [ -n "$args" ] \
+ && "$emacsclient" --eval "(spw/update-environment$args))"
fi
# emacsclient(1) requires an argument. As a special case, if there are no