May as well respect $ALTERNATE_EDITOR if given

This commit is contained in:
TEC 2022-03-28 12:41:20 +08:00
parent c51e75b3ae
commit 37148ed6b4
Signed by: tec
GPG Key ID: 779591AFDB81F06C
1 changed files with 2 additions and 2 deletions

View File

@ -1539,11 +1539,11 @@ if [ -z "$DISPLAY" ] || $force_tty; then
TERM="$termstub-direct"; else TERM="$termstub-direct"; else
TERM="xterm-direct"; fi # should be fairly safe TERM="xterm-direct"; fi # should be fairly safe
fi fi
emacsclient --tty -create-frame --alternate-editor="" "${args[@]}" emacsclient --tty -create-frame --alternate-editor="$ALTERNATE_EDITOR" "${args[@]}"
else else
if ! $force_wait; then if ! $force_wait; then
args+=(--no-wait); fi args+=(--no-wait); fi
emacsclient -create-frame --alternate-editor="" "${args[@]}" emacsclient -create-frame --alternate-editor="$ALTERNATE_EDITOR" "${args[@]}"
fi fi
#+end_src #+end_src