4 editor
=${MDW_EDITOR-ed}
6 [ -t
0 -a
-t
1 ] || TERM
=dumb
7 case "$EDITOR,$VISUAL,$TERM" in
8 mdw-editor
,mdw-editor
,dumb
) editor
=emacsclient emacsclient
=nil
;;
9 mdw-editor
,mdw-editor
,*);;
10 mdw-editor
,*,*) editor
=$VISUAL;;
11 *,*,*) editor
=$EDITOR;;
13 case "$emacsclient" in
14 t
) exec emacsclient
-nw
-a
"$editor" "$@";;
15 nil
) exec $editor "$@";;