Skip to content

Commit

Permalink
Fix option passing to e
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikolai Weibull committed Jan 12, 2015
1 parent 34c3314 commit ab3b8c9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/e.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#! @SHELL@

switches='--alternate-editor ""'
test "x$TERM" != xdumb && switches="$switches -t"
set -- --alternate-editor "" "$@"
test "x$TERM" != xdumb && set -- -t "$@"

if test -t 0; then
exec emacsclient $switches "$@"
exec emacsclient $@"
else
: ${TMPDIR=/tmp}
{ d=`(umask 077 && mktemp -d "$TMPDIR/eXXXXXX") 2>/dev/null` &&
Expand All @@ -14,5 +14,5 @@ else
trap 'rm -rf "$d"' 0 1 2 13 15
t=$d/stdin
cat > "$t" || exit 1
emacsclient $switches "$@" "$t"
emacsclient $@" "$t"
fi

0 comments on commit ab3b8c9

Please sign in to comment.